\documentclass[12pt]{article}

\usepackage[a4paper, margin=1in]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{tikz}
\usepackage[most]{tcolorbox}
\usepackage{amsthm}
\usepackage{etoolbox}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{enumitem}

\setlength{\headheight}{15pt}
\pagestyle{fancy}
\fancyhf{}
\lhead{\textbf{Linear Algebra}}
\rhead{\textbf{Theorems, Lemmas, Corollaries, Propositions, etc.}}
\lfoot{\textbf{St. Francis Xavier University}}
\rfoot{\textbf{Carter Clifton}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\tcbset{
    grayscalebox/.style={
        enhanced,
        sharp corners,
        colback=gray!5,
        colframe=black!10,
        boxrule=0.4pt,
        left=1em,
        right=1em,
        top=0.5em,
        bottom=0.5em,
        fonttitle=\bfseries\normalsize,
        coltitle=black,
        before skip=10pt,
        after skip=10pt
    }
}

\newtcbtheorem[no counter]{theorem}{Theorem}{grayscalebox}{th}
\newtcbtheorem[no counter]{lemma}{Lemma}{grayscalebox}{lem}
\newtcbtheorem[no counter]{corollary}{Corollary}{grayscalebox}{cor}
\newtcbtheorem[no counter]{proposition}{Proposition}{grayscalebox}{prop}
\newtcbtheorem[no counter]{definition}{Definition}{grayscalebox}{def}
\newtcbtheorem[no counter]{example}{Example}{grayscalebox}{ex}
\newtcbtheorem[no counter]{remark}{Remark}{grayscalebox}{rem}
\newtcbtheorem[no counter]{properties}{Properties}{grayscalebox}{prop}
\newtcbtheorem[no counter]{porism}{Porism}{grayscalebox}{por}
\newtcbtheorem[no counter]{laws}{Laws}{grayscalebox}{law}
\newtcbtheorem[no counter]{note}{Note}{grayscalebox}{note}
\newtcbtheorem[no counter]{fact}{Fact}{grayscalebox}{fact}

\newcommand{\horrule}{\noindent\rule{\linewidth}{0.4pt}\newline}

\begin{document}

\begin{definition}{Subspaces of $ \mathbb{R}^n $}{}
    A set $ U $ of vectors in $ \mathbb{R}^n $ is called a subspace of $ \mathbb{R}^n $ if it satisfies the following properties:
    \begin{enumerate}
        \item The zero vector $ \mathbf{0} \in U $
        \item If $ \mathbf{x} \in U $ and $ \mathbf{y} \in U $, then $ \mathbf{x} + \mathbf{y} \in U $
        \item If $ \mathbf{x} \in U $, then $ a \mathbf{x} \in U $ for all $ a \in \mathbb{R} $
    \end{enumerate}
\end{definition}

\begin{definition}{Null Space of a Matrix}{}
    The null space of an $ m \times n $ matrix $ A $ is the set of all vectors for which multiplying by $ A $ gives 0. This is denoted:
    \[ \operatorname{null} A = \left\{ \mathbf{x} \in \mathbb{R}^n \mid A \mathbf{x} = \mathbf{0} \right\} \]
\end{definition}

\begin{definition}{Image Space of a Matrix}{}
    The image space of an $ m \times n $ matrix $ A $ is the set of all vectors which can be obtained by multiplying $ A $ by a vector in $ \mathbb{R}^n $. This is denoted:
    \[ \operatorname{im} A = \left\{ A \mathbf{x} \mid \mathbf{x} \in \mathbb{R}^n \right\} \]
\end{definition}

\begin{definition}{Spanning Set}{}
    The set of all such linear combinations of a set of vectors $ \mathbf{x}_i $ is called the span, and is denoted:
    \[ \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} = \left\{ t_1 \mathbf{x}_1 + t_2 \mathbf{x}_2 + \dots + t_k \mathbf{x}_k \mid t_i \in \mathbb{R} \right\} \]
    If $ V = \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $, we say $ V $ is spanned by the vectors $ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k $, or that the vectors span the space $ V $.
\end{definition}

\begin{theorem}{Span Theorem}{}
    Let $ U = \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ where each $ \mathbf{x}_i \in \mathbb{R}^n $, then
    \begin{enumerate}
        \item $ U $ is a subspace of $ \mathbb{R}^n $ containing each $ \mathbf{x}_i $
        \item If $ W $ is a subspace of $ \mathbb{R}^n $ and each $ \mathbf{x}_i \in W $, then $ U \subseteq W $
    \end{enumerate}
\end{theorem}

\begin{definition}{Linear Independence in $ \mathbb{R}^n $}{}
    We call a set $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots \mathbf{x}_k \right\} $ of vectors linearly independent if:
    \[ t_1 \mathbf{x}_1 + t_2 \mathbf{x}_2 + \dots t_k \mathbf{x}_k = \mathbf{0} \Longrightarrow t_1 = t_2 = \dots = t_k = 0 \]
\end{definition}

\begin{theorem}{}{}
    If $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ is an independent set of vectors in $ \mathbb{R}^n $, then every vector in $ \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ has a unique representation as a linear combination of the $ \mathbf{x}_i $.
\end{theorem}

\begin{theorem}{Independence Test}{}
    To verify that a set $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ of vectors in $ \mathbb{R}^n $ is independent, proceed as follows:
    \begin{enumerate}
        \item Set a linear combination equal to zero: $ t_1 \mathbf{x}_1 + t_2 \mathbf{x}_2 + \dots + t_k \mathbf{x}_k = \mathbf{0} $
        \item Show that $ t_i = 0 $ for each $ i $
    \end{enumerate}
    If some nontrivial linear combination vanishes, the vectors are not independent.
\end{theorem}

\begin{theorem}{Inverse Theorem}{}
    The following conditions are equivalent for an $ n \times n $ matrix $ A $:
    \begin{enumerate}
        \item $ A $ is invertible
        \item $ A \mathbf{x} = \mathbf{0} \Longrightarrow \mathbf{x} = \mathbf{0} $ for $ \mathbf{x} \in \mathbb{R}^n $
        \item $ A \mathbf{x} = \mathbf{b} $ has a solution $ \mathbf{x} $ for every $ \mathbf{b} \in \mathbb{R}^n $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ A $ be an $ m \times n $ matrix and let $ \left\{ \mathbf{c}_1, \mathbf{c}_2, \dots, \mathbf{c}_n \right\} $ denote the columns of $ A $
    \begin{enumerate}
        \item $ \left\{ \mathbf{c}_1, \mathbf{c}_2, \dots, \mathbf{c}_n \right\} $ is independent in $ \mathbb{R}^m $ iff $ A \mathbf{x} = \mathbf{0} $ ($ \mathbf{x} \in \mathbb{R}^n $) implies $ \mathbf{x} = \mathbf{0} $
        \item $ \mathbb{R}^m = \operatorname{span} \left\{ \mathbf{c}_1, \mathbf{c}_2, \dots, \mathbf{c}_n \right\} $ iff $ A \mathbf{x} = \mathbf{b} $ has a solution $ \mathbf{x} $ for every $ \mathbf{b} \in \mathbb{R}^m $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    The following are equivalent for an $ n \times n $ matrix $ A $:
    \begin{enumerate}
        \item $ A $ is invertible
        \item The columns of $ A $ are linearly independent
        \item The columns of $ A $ span $ \mathbb{R}^n $
        \item The rows of $ A $ are linearly independent
        \item The rows of $ A $ span the set of all $ 1 \times n $ rows
    \end{enumerate}
\end{theorem}

\begin{theorem}{Fundamental Theorem}{}
    Let $ U $ be a subspace of $ \mathbb{R}^n $. If $ U $ is spanned by $ m $ vectors, and if $ U $ contains $ k $ linearly independent vectors, then $ k \leq m $.
\end{theorem}

\begin{definition}{Basis of $ \mathbb{R}^n $}{}
    If $ U $ is a subspace of $ \mathbb{R}^n $, a set $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $ of vectors in $ U $ is called a basis of $ U $ if it satisfies the two following conditions:
    \begin{enumerate}
        \item $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $ is linearly independent
        \item $ U = \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $
    \end{enumerate}
\end{definition}

\begin{theorem}{Invariance Theorem in $ \mathbb{R}^n $}{}
    If $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $ and $ \left\{ \mathbf{y}_1, \mathbf{y}_2, \dots, \mathbf{y}_k \right\} $ are both bases of a subspace $ U $ of $ \mathbb{R}^n $, then $ m = k $.
\end{theorem}

\begin{definition}{Dimension of a Subspace of $ \mathbb{R}^n $}{}
    If $ U $ is a subspace of $ \mathbb{R}^n $ and $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $ is any basis of $ U $, the number $ m $ of vectors in the basis is called the dimension of $ U $. This is denoted by:
    \[ \dim U = m \]
\end{definition}

\begin{note}{}{}
    We define:
    \[ \dim \left\{ \mathbf{0} \right\} = 0 \]
    This means that $ \left\{ \mathbf{0} \right\} $ has a basis containing no vectors. This makes sense since $ \mathbf{0} $ cannot belong to any independent set.
\end{note}

\begin{theorem}{}{}
    Let $ U \neq \left\{ \mathbf{0} \right\} $ be a subspace of $ \mathbb{R}^n $. Then,
    \begin{enumerate}
        \item $ U $ has a basis, and $ \dim U \leq n $
        \item Any independent set in $ U $ can be enlarged (by adding vectors from any fixed basis of $ U $) to a basis of $ U $
        \item Any spanning set for $ U $ can be cut down (by deleting vectors) to a basis of $ U $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ U $ be a subspace of $ \mathbb{R}^n $ where $ \dim U = m $ and let $ B = \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $ be a set of $ m $ vectors in $ U $. Then, $ B $ is independent iff $ B $ spans $ U $.
\end{theorem}

\begin{theorem}{}{}
    Let $ U \subseteq W $ be subspaces of $ \mathbb{R}^n $. Then,
    \begin{enumerate}
        \item $ \dim U \leq \dim W $
        \item If $ \dim U = \dim W $, then $ U = W $
    \end{enumerate}
\end{theorem}

\begin{corollary}{}{}
    It follows from the previous theorem that if $ U $ is a subspace of $ \mathbb{R}^n $, then $ \dim U \in \left\{ 0, 1, 2, \dots, n \right\} $ and
    \[ \dim U = 0 \quad \Longleftrightarrow \quad U = \left\{ \mathbf{0} \right\} \]
    \[ \dim U = n \quad \Longleftrightarrow \quad U = \mathbb{R}^n \]
    The other subspaces of $ \mathbb{R}^n $ are called proper.
\end{corollary}

\begin{definition}{Length in $ \mathbb{R}^n $}{}
    The length of a vector $ \mathbf{x} $, denoted $ \lVert \mathbf{x} \rVert $, is defined by:
    \[ \lVert \mathbf{x} \rVert = \sqrt{\mathbf{x} \cdot \mathbf{x}} = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2 } \]
\end{definition}

\begin{theorem}{}{}
    Let $ \mathbf{x}, \mathbf{y}, \mathbf{z} \in \mathbb{R}^n $, then:
    \begin{enumerate}
        \item $ \mathbf{x} \cdot \mathbf{y} = \mathbf{y} \cdot \mathbf{x} $
        \item $ \mathbf{x} \cdot \left( \mathbf{y} + \mathbf{z} \right) = \mathbf{x} \cdot \mathbf{y} + \mathbf{x} \cdot \mathbf{z} $
        \item $ \left( a \mathbf{x} \right) \cdot \mathbf{y} = a \left( \mathbf{x} \cdot \mathbf{y} \right) = \mathbf{x} \cdot \left( a \mathbf{y} \right) \ \forall a \in \mathbb{R} $
        \item $ \lVert \mathbf{x} \rVert^2 = \mathbf{x} \cdot \mathbf{x} $
        \item $ \lVert \mathbf{x} \rVert \geq 0 $, and $ \lVert \mathbf{x} \rVert = 0 $ iff $ \mathbf{x} = \mathbf{0} $
        \item $ \lVert a \mathbf{x} \rVert = \lvert a \rvert \lVert \mathbf{x} \rVert \ \forall a \in \mathbb{R} $
    \end{enumerate}
\end{theorem}

\begin{theorem}{Cauchy Inequality}{}
    If $ \mathbf{x}, \mathbf{y} \in \mathbb{R}^n $, then
    \[ \lvert \mathbf{x} \cdot \mathbf{y} \rvert \leq \lVert \mathbf{x} \rVert \lVert \mathbf{y} \rVert \]
    Moreover, $ \lvert \mathbf{x} \cdot \mathbf{y} \rvert = \lVert \mathbf{x} \rVert \lVert \mathbf{y} \rVert $ iff one of $ \mathbf{x} $ and $ \mathbf{y} $ is a multiple of the other.
    \medskip
    \newline
    The Cauchy inequality is equivalent to $ \left( \mathbf{x} \cdot \mathbf{y} \right)^2 \leq \lVert \mathbf{x} \rVert^2 \lVert \mathbf{y} \rVert^2 $
\end{theorem}

\begin{corollary}{Triangle Inequality}{}
    If $ \mathbf{x}, \mathbf{y} \in \mathbb{R}^n $, then $ \lVert \mathbf{x} + \mathbf{y} \rVert \leq \lVert \mathbf{x} \rVert + \lVert \mathbf{y} \rVert $.
\end{corollary}

\begin{definition}{Distance in $ \mathbb{R}^n $}{}
    If $ \mathbf{x}, \mathbf{y} \in \mathbb{R}^n $, we define the distance function $ d \left( \mathbf{x}, \mathbf{y} \right) $ between $ \mathbf{x} $ and $ \mathbf{y} $ by
    \[ d \left( \mathbf{x}, \mathbf{y} \right) = \lVert \mathbf{x} - \mathbf{y} \rVert \]
\end{definition}

\begin{theorem}{}{}
    If $ \mathbf{x}, \mathbf{y}, \mathbf{z} \in \mathbb{R}^n $, we have:
    \begin{enumerate}
        \item $ d \left( \mathbf{x}, \mathbf{y} \right) \geq 0 $
        \item $ d \left( \mathbf{x}, \mathbf{y} \right) = 0 \ \text{iff} \ \mathbf{x} = \mathbf{y} $
        \item $ d \left( \mathbf{x}, \mathbf{y} \right) = d \left( \mathbf{y}, \mathbf{x} \right) $
        \item $ d \left( \mathbf{x}, \mathbf{z} \right) \leq d \left( \mathbf{x}, \mathbf{y} \right) + d \left( \mathbf{y}, \mathbf{z} \right) $
    \end{enumerate}
\end{theorem}

\begin{definition}{Orthogonal and Orthonormal Sets in $ \mathbb{R}^n $}{}
    We say that two vectors $ \mathbf{x} $ and $ \mathbf{y} \in \mathbb{R}^n $ are orthogonal if $ \mathbf{x} \cdot \mathbf{y} = 0 $. More generally, a set $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ of vectors in $ \mathbb{R}^n $ is called an orthogonal set if
    \[ \mathbf{x}_i \cdot \mathbf{x}_j = 0 \ \forall \ i \neq j \quad \text{and} \quad \mathbf{x}_i \neq \mathbf{0} \ \forall \ i \]
    Note that $ \left\{ \mathbf{x} \right\} $ is an orthogonal set if $ \mathbf{x} \neq \mathbf{0} $. A set $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ of vectors in $ \mathbb{R}^n $ is called orthonormal if it is orthogonal and each $ \mathbf{x}_i $ is a unit vector.
\end{definition}

\begin{theorem}{Normalizing an Orthogonal Set}{}
    If $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ is an orthogonal set, then $ \left\{ \frac{1}{\lVert \mathbf{x}_1 \rVert} \mathbf{x}_1, \frac{1}{\lVert \mathbf{x}_2\rVert} \mathbf{x}_2, \dots, \frac{1}{\lVert \mathbf{x}_k \rVert} \mathbf{x}_k \right\} $ is an orthonormal set, and we say that is the result of normalizing the orthogonal set $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $.
\end{theorem}

\begin{theorem}{Pythagoras' Theorem in $ \mathbb{R}^n $}{}
    If $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ is an orthogonal set in $ \mathbb{R}^n $, then
    \[ \lVert \mathbf{x}_1 + \mathbf{x}_2 + \dots + \mathbf{x}_k \rVert^2 = \lVert \mathbf{x}_1 \rVert^2 + \lVert \mathbf{x}_2 \rVert^2 + \dots + \lVert \mathbf{x}_k \rVert^2 \]
\end{theorem}

\begin{theorem}{Expansion Theorem in $ \mathbb{R}^n $}{}
    Let $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ be an orthogonal basis of a subspace $ U $ of $ \mathbb{R}^n $. If $ \mathbf{x} $ is any vector in $ U $, we have
    \[ \mathbf{x} = \left( \frac{\mathbf{x} \cdot \mathbf{f}_1}{\lVert \mathbf{f}_1 \rVert^2} \right) \mathbf{f}_1 + \left( \frac{\mathbf{x} \cdot \mathbf{f}_2}{\lVert \mathbf{f}_2 \rVert^2} \right) \mathbf{f}_2 + \dots + \left( \frac{\mathbf{x} \cdot \mathbf{f}_m}{\lVert \mathbf{f}_m \rVert^2} \right) \mathbf{f}_m \]
    The expansion of $ \mathbf{x} $ as a linear combination of the orthogonal basis $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ is called the Fourier expansion of $ \mathbf{x} $ and the coefficients $ t_i = \frac{\mathbf{x} \cdot \mathbf{f}_i}{\lVert \mathbf{f}_i \rVert^2 } $ are called the Fourier coefficients.
\end{theorem}

\begin{definition}{Column and Row Space of a Matrix}{}
    The column space, denoted $ \operatorname{col} A $, of $ A $ is the subspace of $ \mathbb{R}^m $ spanned by the columns of $ A $.
    \medskip
    \newline
    The row space, denoted $ \operatorname{row} A $, of $ A $ is the subspace of $ \mathbb{R}^n $ spanned by the rows of $ A $.
\end{definition}

\begin{lemma}{}{}
    Let $ A $ and $ B $ denote $ m \times n $ matrices.
    \begin{enumerate}
        \item If $ A \to B $ by elementary row operations, then $ \operatorname{row} A = \operatorname{row} B $
        \item If $ A \to B $ by elementary column operations, then $ \operatorname{col} A = \operatorname{col} B $
    \end{enumerate}
\end{lemma}

\begin{lemma}{}{}
    If $ R $ is a row-echelon matrix, then:
    \begin{enumerate}
        \item The nonzero rows of $ R $ are a basis of $ \operatorname{row} R $
        \item The columns of $ R $ containing leading ones are a basis of $ \operatorname{col} R $
    \end{enumerate}
\end{lemma}

\begin{theorem}{Rank Theorem}{}
    Let $ A $ denote any $ m \times n $ matrix of rank $ r $. Then,
    \[ \dim \left( \operatorname{col} A \right) = \dim \left( \operatorname{row} A \right) = r \]
    Moreover, if $ A $ is carried to a row-echelon matrix $ R $ by row operations, then
    \begin{enumerate}
        \item The $ r $ nonzero rows of $ R $ are a basis of $ \operatorname{row} A $
        \item If the leading $ 1 $s lie in columns $ j_1, j_2, \dots, j_r $ of $ R $, then columns $ j_1, j_2, \dots, j_r $ of $ A $ are a basis of $ \operatorname{col} A $
    \end{enumerate}
\end{theorem}

\begin{corollary}{}{}
    If $ A $ is any matrix, then $ \operatorname{rank} A = \operatorname{rank} \left( A^T \right) $.
\end{corollary}

\begin{corollary}{}{}
    If $ A $ is an $ m \times n $ matrix, then $ \operatorname{rank} A \leq m $ and $ \operatorname{rank} A \leq n $.
\end{corollary}

\begin{corollary}{}{}
    If $ A $ is an $ m \times n $ matrix, $ U $ is an $ m \times m $ invertible matrix, and $ V $ is an $ n \times n $ invertible matrix, then:
    \[ \operatorname{rank} A = \operatorname{rank} \left( UA \right) = \operatorname{rank} \left( AV \right) \]
\end{corollary}

\begin{lemma}{}{}
    Let $ A, U, V $ be matrices of sizes $ m \times n $, $ p \times m $, and $ n \times q $ respectively.
    \begin{enumerate}
        \item $ \operatorname{col} \left( AV \right) \subseteq \operatorname{col} A $, with equality if $ V V' = I_n $ for some $ V' $
        \item $ \operatorname{row} \left( UA \right) \subseteq \operatorname{row} A $, with equality if $ U' U = I_m $ for some $ U' $
    \end{enumerate}
\end{lemma}

\begin{corollary}{}{}
    If $ A $ is $ m \times n $ and $ B $ is $ n \times m $, then $ \operatorname{rank} \left( AB \right) \leq \operatorname{rank} A $ and $ \operatorname{rank} \left( AB \right) \leq \operatorname{rank} B $.
\end{corollary}

\begin{theorem}{}{}
    Let $ A $ denote an $ m \times n $ matrix of rank $ r $. Then,
    \begin{enumerate}
        \item The $ n - r $ basic solutions to the system $ A \mathbf{x} = \mathbf{0} $ provided by the Gaussian algorithm are a basis of $ \operatorname{null} A $, so $ \dim \left( \operatorname{null} A \right) = n - r $
        \item The rank theorem provides a basis of $ \operatorname{im} A = \operatorname{col} A $, and $ \dim \left( \operatorname{im} A \right) = r $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    The following are equivalent for an $ m \times n $ matrix $ A $:
    \begin{enumerate}
        \item $ \operatorname{rank} A = n $
        \item The rows of $ A $ span $ \mathbb{R}^n $
        \item The columns of $ A $ are linearly independent in $ \mathbb{R}^m $
        \item The $ n \times n $ matrix $ A^T A $ is invertible
        \item $ CA = I_n $ for some $ n \times m $ matrix $ C $
        \item If $ A \mathbf{x} = \mathbf{0} $, $ \mathbf{x} \in \mathbb{R}^n $, then $ \mathbf{x} = \mathbf{0} $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    The following are equivalent for an $ m \times n $ matrix $ A $:
    \begin{enumerate}
        \item $ \operatorname{rank} A = m $
        \item The columns of $ A $ span $ \mathbb{R}^m $
        \item The rows of $ A $ are linearly independent in $ \mathbb{R}^n $
        \item The $ m \times m $ matrix $ A A^T $ is invertible
        \item $ AC = I_m $ for some $ n \times m $ matrix $ C $
        \item The system $ A \mathbf{x} = \mathbf{b} $ is consistent for every $ \mathbf{b} $ in $ \mathbb{R}^m $
    \end{enumerate}
\end{theorem}

\begin{definition}{Similar Matrices}{}
    If $ A $ and $ B $ are $ n \times n $ matrices, we say that $ A $ and $ B $ are similar, and write $ A \sim B $, if $ B = P^{-1} A P $ for some invertible matrix $ P $.
    \medskip
    \newline
    If $ A \sim B $, then necessarily $ B \sim A $. To see why, suppose that $ B = P^{-1} A P $. Then $ A = P B P^{-1} = Q^{-1} B Q $ where $ Q = P^{-1} $ is invertible. This proves the second of the following properties of similarity:
    \begin{enumerate}
        \item $ A \sim A $ for all square matrices $ A $
        \item If $ A \sim B $, then $ B \sim A $
        \item If $ A \sim B $ and $ B \sim C $, then $ A \sim C $
    \end{enumerate}
    These properties say that the similarity relation $ \sim $ is an equivalence relation on the set of $ n \times n $ matrices.
\end{definition}

\begin{note}{}{}
    Similarity is compatible with inverses, transposes and powers:
    \[ \text{If } A \sim B \text{ then } A^{-1} \sim B^{-1}, \quad A^T \sim B^T, \quad \text{and} \quad A^k \sim B^k \ \forall \ k \in \mathbb{Z}^+ \]
\end{note}

\begin{definition}{Trace of a Matrix}{}
    The trace of an $ n \times n $ matrix $ A $, denoted $ \operatorname{tr} A $, is defined to be the sum of the main diagonal elements of $ A $. That is, if $ A = \left[ a_{ij} \right] $, then $ \operatorname{tr} A = a_{11} + a_{22} + \dots + a_{nn} $.
\end{definition}

\begin{lemma}{}{}
    Let $ A $ and $ B $ be $ n \times n $ matrices. Then $ \operatorname{tr} \left( AB \right) = \operatorname{tr} \left( BA \right) $.
\end{lemma}

\begin{theorem}{}{}
    If $ A $ and $ B $ are similar $ n \times n $ matrices, then $ A $ and $ B $ have the same determinant, rank, trace, characteristic polynomial, and eigenvalues.
\end{theorem}

\begin{theorem}{}{}
    Let $ A $ be an $ n \times n $ matrix.
    \begin{enumerate}
        \item The eigenvalues $ \lambda $ of $ A $ are the roots of the characteristic polynomial $ c_A \left( x \right) $ of $ A $
        \item The $ \lambda $-eigenvectors $ \mathbf{x} $ are the nonzero solutions to the homogeneous system
        \[ \left( \lambda I - A \right) \mathbf{x} = \mathbf{0} \]
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ A $ be an $ n \times n $ matrix.
    \begin{enumerate}
        \item $ A $ is diagonalizable iff $ \mathbb{R}^n $ has a basis $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_n \right\} $ consisting of eigenvectors of $ A $
        \item When this is the case, the matrix $ P = \begin{bmatrix} \ \mathbf{x}_1 & \mathbf{x}_2 & \cdots & \mathbf{x}_n \ \end{bmatrix} $ is invertible and $ P^{-1} A P = \operatorname{diag} \left( \lambda_1, \lambda_2, \dots, \lambda_n \right) $ where, for each $ i $, $ \lambda_i $ is the eigenvalue of $ A $ corresponding to $ \mathbf{x}_i $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k $ be eigenvectors corresponding to distinct eigenvalues $ \lambda_1, \lambda_2, \dots, \lambda_k $ of an $ n \times n $ matrix $ A $. Then $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ is a linearly independent set.
\end{theorem}

\begin{theorem}{}{}
    If $ A $ is an $ n \times n $ matrix with $ n $ distinct eigenvalues, then $ A $ is diagonalizable.
\end{theorem}

\begin{lemma}{}{}
    Let $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ be a linearly independent set of eigenvectors of an $ n \times n $ matrix $ A $, extend it to a basis $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k, \dots, \mathbf{x}_n \right\} $ of $ \mathbb{R}^n $, and let
    \[ P = \begin{bmatrix} \ \mathbf{x}_1 & \mathbf{x}_2 & \cdots & \mathbf{x}_n \ \end{bmatrix} \]
    be the (invertible) $ n \times n $ matrix with the $ \mathbf{x}_i $ as its columns. If $ \lambda_1, \lambda_2, \dots, \lambda_k $ are the (not necessarily distinct) eigenvalues of $ A $ corresponding to $ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k $ respectively, then $ P^{-1} A P $ has block form
    \[ P^{-1} A P = \begin{bmatrix} \ \operatorname{diag} \left( \lambda_1, \lambda_2, \dots, \lambda_k \right) & B \ \\ 0 & A_1 \end{bmatrix} \]
    where $ B $ has size $ k \times \left( n - k \right) $ and $ A_1 $ has size $ \left( n - k \right) \times \left( n - k \right) $.
    \medskip
    \newline
    Note that this lemma with $ k = n $ shows that an $ n \times n $ matrix $ A $ is diagonalizable if $ \mathbb{R}^n $ has a basis of eigenvectors of $ A $.
\end{lemma}

\begin{definition}{Eigenspace of a Matrix}{}
    If $ \lambda $ is an eigenvalue of an $ n \times n $ matrix $ A $, define the eigenspace of $ A $ corresponding to $ \lambda $ by:
    \[ E_\lambda \left( A \right) = \left\{ \mathbf{x} \in \mathbb{R}^n \mid A \mathbf{x} = \lambda \mathbf{x} \right\} \]
    Recall the multiplicity of an eigenvalue $ \lambda $ of $ A $ is the number of times $ \lambda $ occurs as a root of the characteristic polynomial $ c_A \left( x \right) $ of $ A $. In other words, the multiplicity of $ \lambda $ is the largest integer $ m \geq 1 $ such that
    \[ c_A \left( x \right) = \left( x - \lambda \right)^m g \left( x \right) \]
    for some polynomial $ g \left( x \right) $.
\end{definition}

\begin{lemma}{}{}
    Let $ \lambda $ be an eigenvalue of multiplicity $ m $ of a square matrix $ A $. Then $ \dim \left( E_\lambda \left( A \right) \right) \leq m $.
\end{lemma}

\begin{note}{}{}
    When does $ \dim \left( E_\lambda \left( A \right) \right) = m $ for each eigenvalue $ \lambda $? It turns out that this characterizes the diagonalizable $ n \times n $ matrices $ A $ for which $ c_A \left( x \right) $ factors completely over $ \mathbb{R} $. By this we mean that $ c_A \left( x \right) = \left( x - \lambda_1 \right) \left( x - \lambda_2 \right) \cdots \left( x - \lambda_n \right) $, where the $ \lambda_i $ are real numbers (not necessarily distinct). In other words, every eigenvalue of $ A $ is real.
\end{note}

\begin{theorem}{}{}
    The following are equivalent for a square matrix $ A $ for which $ c_A \left( x \right) $ factors completely.
    \begin{enumerate}
        \item $ A $ is diagonalizable
        \item $ \dim \left( E_\lambda \left( A \right) \right) $ equals the multiplicity of $ \lambda $ for every eigenvalue $ \lambda $ of the matrix $ A $
    \end{enumerate}
\end{theorem}

\begin{definition}{Vector Spaces}{}
    A vector space consists of a nonempty set $ V $ of objects (called vectors) that can be added, multiplied by a real number, and for which certain axioms hold. If $ \mathbf{u} $ and $ \mathbf{v} $ are two vectors in $ V $, their sum is expressed as $ \mathbf{u} + \mathbf{v} $, and the scalar product of $ \mathbf{v} $ by a real number $ a $ is denoted as $ a \mathbf{v} $. These axioms are called vector addition and scalar multiplication, respectively. The following axioms are assumed to hold.
    \medskip
    \newline
    Axioms for vector addition
    \begin{enumerate}[label=(\roman*)]
        \item If $ \mathbf{u} $ and $ \mathbf{v} $ are in $ V $, then $ \mathbf{u} + \mathbf{v} $ is in $ V $
        \item $ \mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u} $ for all $ \mathbf{u} $ and $ \mathbf{v} $ in $ V $
        \item $ \mathbf{u} + \left( \mathbf{v} + \mathbf{w} \right) = \left( \mathbf{u} + \mathbf{v} \right) + \mathbf{w} $ for all $ \mathbf{u} $, $ \mathbf{v} $ and $ \mathbf{w} $ in $ V $
        \item An element $ \mathbf{0} $ in $ V $ exists such that $ \mathbf{v} + \mathbf{0} = \mathbf{0} + \mathbf{v} = \mathbf{v} $ for every $ \mathbf{v} $ in $ V $
        \item For each $ \mathbf{v} $ in $ V $, an element $ -\mathbf{v} $ in $ V $ exists such that $ -\mathbf{v} + \mathbf{v} = \mathbf{0} $ and $ \mathbf{v} + \left( -\mathbf{v} \right) = \mathbf{0} $
    \end{enumerate}
    Axioms for scalar multiplication
    \begin{enumerate}[label=(\roman*)]
        \item If $ \mathbf{v} $ is in $ V $, then $ a \mathbf{v} $ is in $ V $ for all $ a $ in $ \mathbb{R} $
        \item $ a \left( \mathbf{v} + \mathbf{w} \right) = a \mathbf{v} + a \mathbf{w} $ for all $ \mathbf{v} $ and $ \mathbf{w} $ in $ V $ and all $ a $ in $ \mathbb{R} $
        \item $ \left( a + b \right) \mathbf{v} = a \mathbf{v} + b \mathbf{v} $ for all $ \mathbf{v} $ in $ V $ and all $ a $ and $ b $ in $ \mathbb{R} $
        \item $ a \left( b \mathbf{v} \right) = \left( ab \right) \mathbf{v} $ for all $ \mathbf{v} $ in $ V $ and all $ a $ and $ b $ in $ \mathbb{R} $
        \item $ 1 \mathbf{v} = \mathbf{v} $ for all $ \mathbf{v} $ in $ V $
    \end{enumerate}
\end{definition}

\begin{definition}{Polynomials}{}
    The set $ \mathbf{P} $ of all polynomials is a vector space with addition and scalar multiplication defined as follows for $ p \left( x \right) = a_0 + a_1 x + a_2 x^2 + \dots $ and $ q \left( x \right) = b_0 + b_1 x + b_2 x^2 + \dots $:
    \[ p \left( x \right) + q \left( x \right) = \left( a_0 + b_0 \right) + \left( a_1 + b_1 \right) x + \left( a_2 + b_2 \right) x^2 + \dots \]
    \[ a p(x) = a a_0 + \left( a a_1 \right) x + \left( a a_2 \right) x^2 + \dots \]
    The zero vector is the zero polynomial, and the negative of a polynomial $ p \left( x \right) = a_0 + a_1 x + a_2 x^2 + \dots $ is the polynomial $ -p \left( x \right) = - a_0 - a_1 x - a_2 x^2 - \dots $ obtained by negating all the coefficients.
\end{definition}

\begin{definition}{Polynomials of a Given Degree}{}
    Given $ n \geq 1 $, let $ \mathbf{P}_n $ denote the set of all polynomials of degree at most $ n $, together with the zero polynomial. That is
    \[ \mathbf{P}_n = \left\{ a_0 + a_1 x + a_2 x^2 + \dots + a_n x^n \mid a_0, a_1, a_2, \dots, a_n \in \mathbb{R} \right\} \]
    Then $ \mathbf{P}_n $ is a vector space.
\end{definition}

\begin{definition}{Functions over an Interval}{}
    The set $ \mathbf{F} \left[ a , b \right] $ of all functions on the interval $ \left[ a, b \right] $ is a vector space using pointwise addition ($ \left( f + g \right) \left( x \right) = f \left( x \right) + g \left( x \right) \ \forall x \in \left[ a, b \right] $) and scalar multiplication ($ \left( rf \right) \left( x \right) = r f \left( x \right) \ \forall x \in \left[ a, b \right] $). The zero function denoted $ 0 $ is the constant function defined by
    \[ 0 \left( x \right) = 0 \ \forall x \in \left[ a, b \right] \]
    The negative of a function $ f $ is denoted $ -f $ and has action defined by
    \[ \left( -f \right) \left( x \right) = - f \left( x \right) \ \forall x \in \left[ a, b \right] \]
\end{definition}

\begin{theorem}{Cancellation}{}
    Let $ \mathbf{u} $, $ \mathbf{v} $, and $ \mathbf{w} $ be vectors in a vector space $ V $. If $ \mathbf{v} + \mathbf{u} = \mathbf{v} + \mathbf{w} $, then $ \mathbf{u} = \mathbf{w} $.
\end{theorem}

\begin{definition}{Difference}{}
    We define the difference $ \mathbf{u} - \mathbf{v} $ of two vectors in $ V $ as
    \[ \mathbf{u} - \mathbf{v} = \mathbf{u} + \left( -\mathbf{v} \right) \]
\end{definition}

\begin{theorem}{}{}
    If $ \mathbf{u} $ and $ \mathbf{v} $ are vectors in a vector space $ V $, the equation
    \[ \mathbf{x} + \mathbf{v} = \mathbf{u} \]
    has one and only one solution $ \mathbf{x} $ in $ V $ given by
    \[ \mathbf{x} = \mathbf{u} - \mathbf{v} \]
\end{theorem}

\begin{theorem}{}{}
    Let $ \mathbf{v} $ denote a vector in a vector space $ V $ and let $ a $ denote a real number
    \begin{enumerate}[label=(\roman*)]
        \item $ 0 \mathbf{v} = \mathbf{0} $
        \item $ a \mathbf{0} = \mathbf{0} $
        \item If $ a \mathbf{v} = \mathbf{0} $, then either $ a = 0 $ or $ \mathbf{v} = \mathbf{0} $
        \item $ \left( -1 \right) \mathbf{v} = -\mathbf{v} $
        \item $ \left( -a \right) \mathbf{v} = - \left( a \mathbf{v} \right) = a \left( -\mathbf{v} \right) $
    \end{enumerate}
\end{theorem}

\begin{definition}{Subspaces of a Vector Space}{}
    If $ V $ is a vector space, a nonempty subset $ U \subseteq V $ is called a subspace of $ V $ if $ U $ is itself a vector space using the addition and scalar multiplication of $ V $.
\end{definition}

\begin{theorem}{Subspace Test}{}
    A subset $ U $ of a vector space is a subspace of $ V $ if and only if it satisfies the following three conditions:
    \begin{enumerate}[label=(\roman*)]
        \item $ \mathbf{0} $ lies in $ U $ where $ \mathbf{0} $ is the zero vector of $ V $
        \item If $ \mathbf{u}_1 $ and $ \mathbf{u}_2 $ are in $ U $, then $ \mathbf{u}_1 + \mathbf{u}_2 $ is also in $ U $
        \item If $ \mathbf{u} $ is in $ U $, then $ a \mathbf{u} $ is in $ U $ for each scalar $ a $
    \end{enumerate}
\end{theorem}

\begin{note}{}{}
    If $ V $ is any vector space, both $ \left\{ \mathbf{0} \right\} $ and $ V $ are subspaces of $ V $. The vector space $ \left\{ \mathbf{0} \right\} $ is called the zero subspace of $ V $.
\end{note}

\begin{definition}{$ m \times n $ Matrices}{}
    The set $ \mathbf{M}_{mn} $ of all $ m \times n $ matrices is a vector space where addition and scalar multiplication are the standard definitions for matrices.
\end{definition}

\begin{definition}{Evaluation}{}
    Suppose $ p \left( x \right) $ is a polynomial and $ a $ is a number. Then the number $ p \left( a \right) $ obtained by replacing $ x $ by $ a $ in the expression for $ p \left( x \right) $ is called the evaluation of $ p \left( x \right) $ at $ a $. If $ p \left( a \right) = 0 $, the number $ a $ is called a root of $ p \left( x \right) $.
\end{definition}

\begin{theorem}{}{}
    $ \mathbf{P}_n $ is a subspace of $ \mathbf{P} $ for each $ n \geq 0 $.
\end{theorem}

\begin{theorem}{}{}
    The subset $ \mathbf{D} \left[ a, b \right] $ of all differentiable functions on $ \left[ a, b \right] $ is a subspace of the vector space $ \mathbf{F} \left[ a, b \right] $.
\end{theorem}

\begin{definition}{Linear Combinations and Spanning}{}
    Let $ \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $ be a set of vectors in a vector space $ V $. As in $ \mathbb{R}^n $, a vector $ \mathbf{v} $ is called a linear combination of the vectors $ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n $ if it can be expressed in the form
    \[ \mathbf{v} = a_1 \mathbf{v}_1 + a_2 \mathbf{v}_2 + \dots + a_n \mathbf{v}_n \]
    where $ a_1, a_2, \dots, a_n $ are scalars, called the coefficients of $ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n $. The set of all linear combinations of these vectors is called their span, and is denoted by
    \[ \operatorname{span} \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} = \left\{ a_1 \mathbf{v}_1 + a_2 \mathbf{v}_2 + \dots + a_n \mathbf{v}_n \mid a_i \in \mathbb{R} \right\} \]
    If it happens that $ V = \operatorname{span} \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $, these vectors are called a spanning set for $ V $.
\end{definition}

\begin{theorem}{}{}
    Let $ U = \operatorname{span} \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $ in a vector space $ V $. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ U $ is subspace of $ V $ containing each of $ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n $
        \item $ U $ is the ``smallest'' subspace containing these vectors in the sense that any subspace that contains each of $ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n $ must contain $ U $
    \end{enumerate}
\end{theorem}

\begin{theorem}{Linear Independence and Dependence}{}
    As in $ \mathbb{R}^n $, a set of vectors $ \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $ in a vector space $ V $ is called linearly independent if it satisfies the following condition:
    \[ \text{If } s_1 \mathbf{v}_1 + s_2 \mathbf{v}_2 + \dots + s_n \mathbf{v}_n = \mathbf{0}, \quad \text{then} \quad s_1 = s_2 = \dots = s_n = 0 \]
\end{theorem}

\begin{theorem}{}{}
    Let $ \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $ be a linearly independent set of vectors in a vector space $ V $. If a vector $ \mathbf{v} $ has two representations:
    \[ \mathbf{v} = s_1 \mathbf{v}_1 + s_2 \mathbf{v}_2 + \dots + s_n \mathbf{v}_n \]
    \[ \mathbf{v} = t_1 \mathbf{v}_1 + t_2 \mathbf{v}_2 + \dots + t_n \mathbf{v}_n \]
    as a linear combination of these vectors, then $ s_1 = t_1 $, $ s_2 = t_2 $, $ \dots $, $ s_n = t_n $. In other words, every vector in $ V $ can be written in a unique way as a linear combination of the $ \mathbf{v}_i $.
\end{theorem}

\begin{theorem}{Fundamental Theorem}{}
    Suppose a vector space $ V $ can be spanned by $ n $ vectors. If any set of $ m $ vectors in $ V $ is linearly independent, then $ m \leq n $.
\end{theorem}

\begin{definition}{Basis of a Vector Space}{}
    As in $ \mathbb{R}^n $, a set $ \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ of vectors in a vector space $ V $ is called a basis of $ V $ if it satisfies the two following conditions:
    \begin{enumerate}[label=(\roman*)]
        \item $ \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ is linearly independent
        \item $ V = \operatorname{span} \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $
    \end{enumerate}
\end{definition}

\begin{theorem}{Invariance Theorem}{}
    Let $ \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ and $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ be two bases of a vector space $ V $. Then $ n = m $.
\end{theorem}

\begin{definition}{Dimension of a Vector Space}{}
    If $ \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ is a basis of the nonzero vector space $ V $, the number $ n $ of vectors in the basis is called the dimension of $ V $, and we write
    \[ \dim V = n \]
    The zero vector space $ \left\{ \mathbf{0} \right\} $ is defined to have dimension 0:
    \[ \dim \left\{ \mathbf{0} \right\} = 0 \]
\end{definition}

\begin{note}{}{}
    The space $ \mathbf{M}_{mn} $ has dimension $ mn $, and one basis consists of all $ m \times n $ matrices with exactly one entry equal to 1 and all other entries equal to 0. We call this the standard basis of $ \mathbf{M}_{mn} $.
\end{note}

\begin{note}{}{}
    The space $ \mathbf{P}_n $ has dimension $ n + 1 $. The standard basis of this space is $ \left\{ 1, x, x^2, \dots, x^n \right\} $.
\end{note}

\begin{lemma}{Independent Lemma}{}
    Let $ \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k \right\} $ be an independent set of vectors in a vector space $ V $. If $ \mathbf{u} \in V $ but $ \mathbf{u} \notin \operatorname{span} \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k \right\} $, then $ \left\{ \mathbf{u}, \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k \right\} $ is also independent.
\end{lemma}

\begin{definition}{Finite Dimensional and Infinite Dimensional Vector Spaces}{}
    A vector space $ V $ is called finite dimensional if it is spanned by a finite set of vectors. Otherwise, $ V $ is called infinite dimensional.
\end{definition}

\begin{note}{}{}
    The zero vector space $ \left\{ \mathbf{0} \right\} $ is finite dimensional because $ \left\{ \mathbf{0} \right\} $ is a spanning set.
\end{note}

\begin{lemma}{}{}
    Let $ V $ be a finite dimensional vector space. If $ U $ is any subspace of $ V $, then any independent subset of $ U $ can be enlarged to a finite basis of $ U $.
\end{lemma}

\begin{theorem}{}{}
    Let $ V $ be a finite dimensional vector space spanned by $ m $ vectors.
    \begin{enumerate}[label=(\roman*)]
        \item $ V $ has a finite basis, and $ \dim V \leq m $
        \item Every independent set of vectors in $ V $ can be enlarged to a basis of $ V $ by adding vectors from any fixed basis of $ V $
        \item If $ U $ is a subspace of $ V $, then
        \begin{enumerate}
            \item $ U $ is finite dimensional and $ \dim U \leq \dim V $
            \item If $ \dim U = \dim V $ then $ U = V $
        \end{enumerate}
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ U $ and $ W $ be subspaces of the finite dimensional space $ V $
    \begin{enumerate}[label=(\roman*)]
        \item If $ U \subseteq W $, then $ \dim U \leq \dim W $
        \item If $ U \subseteq W $ and $ \dim U = \dim W $, then $ U = W $
    \end{enumerate}
\end{theorem}

\begin{lemma}{Independent Lemma}{}
    A set $ D = \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k \right\} $ of vectors in a vector space $ V $ is dependent if and only if some vector in $ D $ is a linear combination of the others.
\end{lemma}

\begin{theorem}{}{}
    Let $ V $ be a finite dimensional vector space. Any spanning set for $ V $ can be cut down (by deleting vectors) to a basis of $ V $.
\end{theorem}

\begin{theorem}{}{}
    Let $ V $ be a vector space with $ \dim V = n $, and suppose $ S $ is a set of exactly $ n $ vectors in $ V $. Then $ S $ is independent if and only if $ S $ spans $ V $.
\end{theorem}

\begin{definition}{Sum and Intersection}{}
    If $ U $ and $ W $ are subspaces of $ V $, their sum $ U + W $ and their intersection $ U \cap W $ are:
    \[ U + W = \left\{ \mathbf{u} + \mathbf{w} \mid \mathbf{u} \in U \ \text{and} \ \mathbf{w} \in W \right\} \]
    \[ U \cap W = \left\{ \mathbf{v} \mid \mathbf{v} \in U \ \text{and} \ \mathbf{v} \in W \right\} \]
\end{definition}

\begin{theorem}{}{}
    Suppose that $ U $ and $ W $ are finite dimensional subspaces of a vector space $ V $. Then $ U + W $ is finite dimensional, and
    \[ \dim \left( U + W \right) = \dim U + \dim W - \dim \left( U \cap W \right) \]
\end{theorem}

\begin{definition}{Linear Transformations of Vector Spaces}{}
    If $ V $ and $ W $ are two vector spaces, a function $ T : V \to W $ is called a linear transformation if it satisfies the following axioms.
    \begin{enumerate}[label=(\roman*)]
        \item $ T \left( \mathbf{v} + \mathbf{v}_1 \right) = T \left( \mathbf{v} \right) + T \left( \mathbf{v}_1 \right) \ \forall \mathbf{v}, \mathbf{v}_1 \in V $
        \item $ T \left( r \mathbf{v} \right) = r T ( \mathbf{v} ) \ \forall \mathbf{v} \in V, r \in \mathbb{R} $
    \end{enumerate}
\end{definition}

\begin{definition}{Linear Operator}{}
    A linear transformation $ T : V \to V $ is called a linear operator on $ V $.
\end{definition}

\begin{note}{}{}
    If $ V $ and $ W $ are vector spaces, the following are linear transformations
    \begin{enumerate}[label=(\roman*)]
        \item Identity Operator $ V \to V $
        \[ 1_V : V \to V \ \text{where} \ 1_V \left( \mathbf{v} \right) = \mathbf{v} \ \forall \mathbf{v} \in V \]
        \item Zero Transformation $ V \to W $
        \[ 0 : V \to W \ \text{where} \ 0 \left( \mathbf{v} \right) = \mathbf{0} \ \forall \mathbf{v} \in V \]
        \item Scalar Operator $ V \to V $
        \[ a : V \to V \ \text{where} \ a \left( \mathbf{v} \right) = a \mathbf{v} \ \forall \mathbf{v} \in V, a \in \mathbb{R} \]
    \end{enumerate}
\end{note}

\begin{theorem}{}{}
    Let $ T : V \to W $ be a linear transformation
    \begin{enumerate}[label=(\roman*)]
        \item $ T \left( \mathbf{0} \right) = \mathbf{0} $
        \item $ T \left( -\mathbf{v} \right) = - T \left( \mathbf{v} \right) \ \forall \mathbf{v} \in V $
        \item $ T \left( r_1 \mathbf{v}_1 + r_2 \mathbf{v}_2 + \dots + r_k \mathbf{v}_k \right) = r_1 T ( \mathbf{v}_1 ) + r_2 T ( \mathbf{v}_2 ) + \dots + r_k T ( \mathbf{v}_k ) \ \forall v_i \in V, r_i \in \mathbb{R}$
    \end{enumerate}
\end{theorem}

\begin{definition}{Equality of Linear Transformations}{}
    Two linear transformations $ T : V \to W $ and $ S : V \to W $ are called equal (written $ T = S $) if they have the same action, that is, $ T \left( \mathbf{v} \right) = S \left( \mathbf{v} \right) \ \forall \mathbf{v} \in V $
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to W $ and $ S : V \to W $ be two linear transformations. Suppose that $ V = \operatorname{span} \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $. If $ T \left( \mathbf{v}_i \right) = S \left( \mathbf{v}_i \right) $ for each $ i $, then $ T = S $.
\end{theorem}

\begin{theorem}{}{}
    Let $ V $ and $ W $ be vector spaces and let $ \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $ be a basis of $ V $. Given any vectors $ \mathbf{w}_1, \mathbf{w}_2, \dots, \mathbf{w}_n $ in $ W $ (not necessarily distinct), there exists a unique linear transformation $ T : V \to W $ satisfying $ T \left( \mathbf{b}_i \right) = \mathbf{w_i} $, for each $ i = 1, 2, \dots, n $. In fact, the action of $ T $ is as follows:
    \medskip
    \newline
    Given $ \mathbf{v} = v_1 \mathbf{b}_1 + v_2 \mathbf{b}_2 + \dots + v_n \mathbf{b}_n \in V $, $ v_i \in \mathbb{R} $, then
    \[ T \left( \mathbf{v} \right) = T \left( v_1 \mathbf{b}_1 + v_2 \mathbf{b}_2 + \dots + v_n \mathbf{b}_n \right) = v_1 \mathbf{w}_1 + v_2 \mathbf{w}_2 + \dots + v_n \mathbf{w}_n \]
\end{theorem}

\begin{definition}{Kernel and Image of a Linear Transformation}{}
    The kernel of $ T $ (denoted $ \ker T $) and the image of $ T $ (denoted $ \operatorname{im} T $ or $ T \left( V \right) $) are defined by
    \[ \ker T = \left\{ \mathbf{v} \in V \mid T \left( \mathbf{v} \right) = \mathbf{0} \right\} \]
    \[ \operatorname{im} T = \left\{ T \left( \mathbf{v} \right) \mid \mathbf{v} \in V \right\} = T \left( V \right) \]
    The kernel of $ T $ is often called the nullspace of $ T $ because it consists of all vectors $ \mathbf{v} \in V $ satisfying the condition that $ T \left( \mathbf{v} \right) = \mathbf{0} $. The image of $ T $ is often called the range of $ T $ and consists of all vectors $ \mathbf{w} \in W $ of the form $ \mathbf{w} = T \left( \mathbf{v} \right) $ for some $ \mathbf{v} \in V $.
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to W $ be a linear transformation.
    \begin{enumerate}[label=(\roman*)]
        \item $ \ker T $ is a subspace of $ V $
        \item $ \operatorname{im} T $ is a subspace of $ W $
    \end{enumerate}
\end{theorem}

\begin{definition}{Nullity and Rank}{}
    Given a linear transformation $ T : V \to W $:
    \begin{enumerate}[label=(\roman*)]
        \item $ \dim \left( \ker T \right) $ is called the nullity of $ T $ and denoted as $ \operatorname{nullity} \left( T \right) $
        \item $ \dim \left( \operatorname{im} T \right) $ is called the rank of $ T $ and denoted as $ \operatorname{rank} \left( T \right) $
    \end{enumerate}
\end{definition}

\begin{definition}{One-to-one and Onto Linear Transformations}{}
    Let $ T : V \to W $ be a linear transformation.
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is said to be onto if $ \operatorname{im} T = W $
        \item $ T $ is said to be one-to-one if $ T \left( \mathbf{v} \right) = T \left( \mathbf{v}_1 \right) $ implies $ \mathbf{v} = \mathbf{v}_1 $
    \end{enumerate}
\end{definition}

\begin{theorem}{}{}
    If $ T : V \to W $ is a linear transformation, then $ T $ is one-to-one if and only if $ \ker T = \left\{ \mathbf{0} \right\} $.
\end{theorem}

\begin{note}{}{}
    The identity transformation $ 1_V : V \to V $ is both one-to-one and onto for any vector space $ V $.
\end{note}

\begin{theorem}{}{}
    Let $ A $ be an $ m \times n $ matrix, and let $ T_A : \mathbb{R}^n \to \mathbb{R}^m $ be the linear transformation induced by $ A $, that is $ T_A \left( \mathbf{x} \right) = A \mathbf{x} $ for all columns $ \mathbf{x} \in \mathbb{R}^n $.
    \begin{enumerate}[label=(\roman*)]
        \item $ T_A $ is onto if and only if $ \operatorname{rank} A = m $
        \item $ T_A $ is one-to-one if and only if $ \operatorname{rank} A = n $
    \end{enumerate}
\end{theorem}

\begin{theorem}{Dimension Theorem}{}
    Let $ T : V \to W $ be any linear transformation and assume that $ \ker T $ and $ \operatorname{im} T $ are both finite dimensional. Then $ V $ is also finite dimensional and
    \[ \dim V = \dim \left( \ker T \right) + \dim \left( \operatorname{im} T \right) \]
    In other words, $ \dim V = \operatorname{nullity} \left( T \right) + \operatorname{rank} \left( T \right) $.
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to W $ be a linear transformation, and let $ \left\{ \mathbf{e}_1, \dots, \mathbf{e}_r, \mathbf{e}_{r+1}, \dots, \mathbf{e}_n \right\} $ be a basis of $ V $ such that $ \left\{ \mathbf{e}_{r+1}, \dots, \mathbf{e}_n \right\} $ is a basis of $ \ker T $. Then $ \left\{ T \left( \mathbf{e}_1 \right), \dots, T \left( \mathbf{e}_r \right) \right\} $ is a basis of $ \operatorname{im} T $, and hence $ r = \operatorname{rank} T $.
\end{theorem}

\begin{definition}{Isomorphic Vector Spaces}{}
    A linear transformation $ T : V \to W $ is called an isomorphism if it is both one-to-one and onto. The vector spaces $ V $ and $ W $ are said to be isomorphic if there exists an isomorphism $ T : V \to W $, and we write $ V \cong W $ when this is the case.
\end{definition}

\begin{note}{}{}
    An isomorphism $ T : V \to W $ induces a pairing
    \[ \mathbf{v} \leftrightarrow T \left( \mathbf{v} \right) \]
    between vectors $ \mathbf{v} \in V $ and vectors $ T \left( \mathbf{v} \right) \in W $ that preserves vector addition and scalar multiplication. Hence, as far as their vector space properties are concerned, the spaces $ V $ and $ W $ are identical except for notation.
\end{note}

\begin{theorem}{}{}
    If $ V $ and $ W $ are finite dimensional spaces, the following conditions are equivalent for a linear transformation $ T : V \to W $.
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is an isomorphism
        \item If $ \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ is any basis of $ V $, then $ \left\{ T \left( \mathbf{e}_1 \right), T \left( \mathbf{e}_2 \right), \dots, T \left( \mathbf{e}_n \right) \right\} $ is a basis of $ W $.
        \item There exists a basis $ \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ of $ V $ such that $ \left\{ T \left( \mathbf{e}_1 \right), T \left( \mathbf{e}_2 \right), \dots, T \left( \mathbf{e}_n \right) \right\} $ is a basis of $ W $.
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    If $ V $ and $ W $ are finite dimensional vector spaces, then $ V \cong W $ if and only if $ \dim V = \dim W $
\end{theorem}

\begin{corollary}{}{}
    Let $ U $, $ V $ and $ W $ denote vector spaces. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ V \cong V $ for every vector space $ V $
        \item If $ V \cong W $ then $ W \cong V $
        \item If $ U \cong V $ and $ V \cong W $, then $ U \cong W $
    \end{enumerate}
\end{corollary}

\begin{corollary}{}{}
    If $ V $ is a vector space and $ \dim V = n $, then $ V $ is isomorphic to $ \mathbb{R}^n $. 
\end{corollary}

\begin{definition}{Coordinate Isomorphism}{}
    Let $ V $ be an $ n $-dimensional vector space with basis 
    $ B = \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $. The coordinate isomorphism corresponding to $ B $ is the linear transformation $ C_B : V \to \mathbb{R}^n $ defined by
    \[ C_B \left( v_1 \mathbf{b}_1 + \dots + v_n \mathbf{b}_n \right) = \begin{bmatrix} \ v_1 \ \\ v_2 \\ \vdots \\ v_n \end{bmatrix} \]
    It satisfies $ C_B \left( \mathbf{b}_i \right) = \mathbf{e}_i $ for each $ i $ and is an isomorphism.
\end{definition}

\begin{theorem}{}{}
    If $ V $ and $ W $ have the same dimension $ n $, a linear transformation $ T : V \to W $ is an isomorphism if it is either one-to-one or onto.
\end{theorem}

\begin{definition}{Composition of Linear Transformations}{}
    Given linear transformations $ V \xrightarrow{T} W \xrightarrow{S} U $, the composite $ ST : V \to U $ of $ T $ and $ S $ is defined by
    \[ ST \left( \mathbf{v} \right) = S \left[ T \left( \mathbf{v} \right) \right] \ \forall \mathbf{v} \in V \]
    The operation of forming the new function $ ST $ is called composition (sometimes denoted $ S \circ T $).
\end{definition}

\begin{theorem}{}{}
    Let $ V \xrightarrow{T} W \xrightarrow{S} U \xrightarrow{R} Z $ be linear transformations.
    \begin{enumerate}[label=(\roman*)]
        \item The composite $ ST $ is again a linear transformation
        \item $ T 1_V = T $ and $ 1_W T = T $
        \item $ \left( RS \right) T = R \left( ST \right) $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ V $ and $ W $ be finite dimensional vector spaces. The following conditions are equivalent for a linear transformation $ T : V \to W $.
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is an isomorphism
        \item There exists a linear transformation $ S : W \to V $ such that $ ST = 1_V $ and $ TS = 1_W $
    \end{enumerate}
\end{theorem}

\begin{definition}{Inverse of Linear Transformations}{}
    Given an isomorphism $ T : V \to W $, there exists another isomorphism called the inverse of $ T $, denoted by $ T^{-1} $. $ T : V \to W $ and $ T^{-1} : W \to V $ are related by the fundamental identities:
    \[ T^{-1} \left[ T \left( \mathbf{v} \right) \right] = \mathbf{v} \ \forall \mathbf{v} \in V \ \text{and} \ T \left[ T^{-1} \left( \mathbf{w} \right) \right] = \mathbf{w} \ \forall \mathbf{w} \in W \]
\end{definition}

\begin{lemma}{Orthogonal Lemma in $ \mathbb{R}^n $}{}
    Let $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ be an orthogonal set in $ \mathbb{R}^n $. Given $ \mathbf{x} \in \mathbb{R}^n $, write
    \[ \mathbf{f}_{m + 1} = \mathbf{x} - \frac{\mathbf{x} \cdot \mathbf{f}_1}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 - \frac{\mathbf{x} \cdot \mathbf{f}_2}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 - \dots - \frac{\mathbf{x} \cdot \mathbf{f}_m}{\lVert \mathbf{f}_m \rVert^2} \mathbf{f}_m \]
    Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \mathbf{f}_{m + 1} \cdot \mathbf{f}_k = 0 $ for $ k = 1, 2, \dots, m $
        \item If $ \mathbf{x} \notin \operatorname{span} \left\{ \mathbf{f}_1, \dots, \mathbf{f}_m \right\} $, then $ \mathbf{f}_{m + 1} \neq 0 $ and $ \left\{ \mathbf{f}_1, \dots, \mathbf{f}_m, \mathbf{f}_{m + 1} \right\} $ is an orthogonal set.
    \end{enumerate}
\end{lemma}

\begin{theorem}{}{}
    Let $ U $ be a subspace of $ \mathbb{R}^n $
    \begin{enumerate}[label=(\roman*)]
        \item Every orthogonal subset $ \left\{ \mathbf{f}_1, \dots, \mathbf{f}_m \right\} $ in $ U $ is a subset of an orthogonal basis of $ U $
        \item $ U $ has an orthogonal basis
    \end{enumerate}
\end{theorem}

\begin{theorem}{Gram-Schmidt Orthogonalization Algorithm in $ \mathbb{R}^n $}{}
    If $ \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_m \right\} $ is any basis of a subspace $ U $ of $ \mathbb{R}^n $, construct $ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m $ in $ U $ successively as follows:
    \begin{align*}
        \mathbf{f}_1 & = \mathbf{x}_1 \\
        \mathbf{f}_2 & = \mathbf{x}_2 - \frac{\mathbf{x}_2 \cdot \mathbf{f}_1}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 \\
        \mathbf{f}_3 & = \mathbf{x}_3 - \frac{\mathbf{x}_3 \cdot \mathbf{f}_1}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 - \frac{\mathbf{x}_3 \cdot \mathbf{f}_2}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 \\
        \vdots \\
        \mathbf{f}_k & = \mathbf{x}_k - \frac{\mathbf{x}_k \cdot \mathbf{f}_1}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 - \frac{\mathbf{x}_k \cdot \mathbf{f}_2}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 - \dots - \frac{\mathbf{x}_k \cdot \mathbf{f}_{k - 1}}{\lVert \mathbf{f}_{k - 1} \rVert^2} \mathbf{f}_{k - 1} \\
    \end{align*}
    for each $ k = 2, 3, \dots m $. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ is an orthogonal basis of $ U $
        \item $ \operatorname{span} \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_k \right\} = \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $ for each $ k = 1, 2, \dots, m $
    \end{enumerate}
\end{theorem}

\begin{remark}{}{}
    Observe that the vector $ \frac{\mathbf{x} \cdot \mathbf{f}_i}{\lVert \mathbf{f}_i \rVert^2} \mathbf{f}_i $ is unchanged if a nonzero scalar multiple of $ \mathbf{f}_i $ is used in place of $ \mathbf{f}_i $. Hence, if a newly constructed $ \mathbf{f}_i $ is multiplied by a nonzero scalar at some stage of the Gram-Schmidt algorithm, the subsequent $ \mathbf{f} $'s will be unchanged. This is useful in actual calculations.
\end{remark}

\begin{definition}{Orthogonal Complement of a Subspace of $ \mathbb{R}^n $}{}
    If $ U $ is a subspace of $ \mathbb{R} $, define the orthogonal complement $ U^\perp $ of $ U $ by:
    \[ U^\perp = \left\{ \mathbf{x} \in \mathbb{R}^n \mid \mathbf{x} \cdot \mathbf{y} = 0 \ \forall \mathbf{y} \in U \right\} \]
\end{definition}

\begin{lemma}{}{}
    Let $ U $ be a subspace of $ \mathbb{R}^n $
    \begin{enumerate}[label=(\roman*)]
        \item $ U^\perp $ is a subspace of $ \mathbb{R}^n $
        \item $ \left\{ \mathbf{0} \right\}^\perp = \mathbb{R}^n $ and $ \left( \mathbb{R}^n \right)^\perp = \left\{ \mathbf{0} \right\} $
        \item If $ U = \operatorname{span} \left\{ \mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_k \right\} $, then $ U^\perp = \left\{ \mathbf{x} \in \mathbb{R}^n \mid \mathbf{x} \cdot \mathbf{x}_i = 0 \ \text{for} \ i = 1, 2, \dots, k \right\} $
    \end{enumerate}
\end{lemma}

\begin{definition}{Projection onto a Subspace of $ \mathbb{R}^n $}{}
    Let $ U $ be a subspace of $ \mathbb{R}^n $ with orthogonal basis $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $. If $ \mathbf{x} \in \mathbb{R}^n $, the vector
    \[ \operatorname{proj}_U \mathbf{x} = \frac{\mathbf{x} \cdot \mathbf{f}_1}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 + \frac{\mathbf{x} \cdot \mathbf{f}_2}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 + \dots + \frac{\mathbf{x} \cdot \mathbf{f}_m}{\lVert \mathbf{f}_m \rVert^2} \mathbf{f}_m \]
    is called the orthogonal projection of $ \mathbf{x} $ on $ U $. For the zero subspace $ U = \left\{ \mathbf{0} \right\} $, we define
    \[ \operatorname{proj}_{\left\{ \mathbf{0} \right\}} \mathbf{x} = \mathbf{0} \]
\end{definition}

\begin{theorem}{Projection Theorem in $ \mathbb{R}^n $}{}
    If $ U $ is a subspace of $ \mathbb{R}^n $ and $ \mathbf{x} \in \mathbb{R}^n $, write $ \mathbf{p} = \operatorname{proj}_U \mathbf{x} $. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \mathbf{p} \in U $ and $ \mathbf{x} - \mathbf{p} \in U^\perp $
        \item $ \mathbf{p} $ is the vector in $ U $ closest to $ \mathbf{x} $ in the sense that
        \[ \lVert \mathbf{x} - \mathbf{p} \rVert < \lVert \mathbf{x} - \mathbf{y} \rVert \ \forall \mathbf{y} \in U, \mathbf{y} \neq \mathbf{p} \]
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ U $ be a fixed subspace of $ \mathbb{R}^n $. If we define $ T : \mathbb{R}^n \to \mathbb{R}^n $ by
    \[ T \left( \mathbf{x} \right) = \operatorname{proj}_U \mathbf{x} \ \forall \mathbf{x} \in \mathbb{R}^n \]
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is a linear operator
        \item $ \operatorname{im} T = U $ and $ \ker T = U^\perp $
        \item $ \dim U + \dim U^\perp = n $
    \end{enumerate}
\end{theorem}

\begin{theorem}{Orthogonal Matrix Criteria}{}
    The following conditions are equivalent for an $ n \times n $ matrix $ P $.
    \begin{enumerate}[label=(\roman*)]
        \item $ P $ is invertible and $ P^{-1} = P^T $
        \item The rows of $ P $ are orthonormal
        \item The columns of $ P $ are orthonormal
    \end{enumerate}
\end{theorem}

\begin{definition}{Orthogonal Matrices}{}
    An $ n \times n $ matrix $ P $ is called an orthogonal matrix if it satisfies one (and hence all) of the conditions in the ``Orthogonal Matrix Criteria'' theorem.
\end{definition}

\begin{definition}{Orthogonal Diagonalizable Matrices}{}
    An $ n \times n $ matrix $ A $ is said to be orthogonally diagonalizable when an orthogonal matrix $ P $ can be found such that $ P^{-1} AP = P^T AP $ is diagonal.
\end{definition}

\begin{theorem}{Principal Axes Theorem for Matrices}{}
    The following conditions are equivalent for an $ n \times n $ matrix $ A $.
    \begin{enumerate}[label=(\roman*)]
        \item $ A $ has an orthonormal set of $ n $ eigenvectors
        \item $ A $ is orthogonally diagonalizable
        \item $ A $ is symmetric
    \end{enumerate}
    Since the eigenvalues of a (real) symmetric matrix are real, this theorem is sometimes called the real spectral theorem, and the set of distinct eigenvalues is called the spectrum of the matrix.
\end{theorem}

\begin{definition}{Principal Axes}{}
    A set of orthonormal eigenvectors of a symmetric matrix $ A $ is called a set of principal axes for $ A $.
\end{definition}

\begin{theorem}{}{}
    If $ A $ is an $ n \times n $ symmetric matrix, then
    \[ \left( A \mathbf{x} \right) \cdot \mathbf{y} = \mathbf{x} \cdot \left( A \mathbf{y} \right) \]
    for all columns $ \mathbf{x}, \mathbf{y} \in \mathbb{R}^n $.
\end{theorem}

\begin{theorem}{}{}
    If $ A $ is a symmetric matrix, then eigenvectors of $ A $ corresponding to distinct eigenvalues are orthogonal.
\end{theorem}

\begin{definition}{Quadratic Forms \& Principal Axes}{}
    If $ A $ is symmetric and a set of orthogonal eigenvectors of $ A $ is given, the eigenvectors are called principal axes of $ A $. An expression $ q = a x_1^2 + b x_1 x_2 + c x_2^2 $ is called a quadratic form in the variables $ x_1 $ and $ x_2 $, and the graph of the equation $ q = 1 $ is called a conic in these variables.
    \medskip
    \newline
    If we introduce new variables $ y_1 $ and $ y_2 $ by setting $ x_1 = y_1 + y_2 $ and $ x_2 = y_1 - y_2 $, then $ q = y_1^2 - y_2^2 $, a diagonal form with no cross term $ y_1 y_2 $. Then, the $ y_1 $ and $ y_2 $ axes are called the principal axes for the conic.
\end{definition}

\begin{theorem}{Triangulation Theorem}{}
    If $ A $ is an $ n \times n $ matrix with $ n $ real eigenvalues, an orthogonal matrix $ P $ exists such that $ P^T AP $ is upper triangular.
\end{theorem}

\begin{corollary}{}{}
    If $ A $ is an $ n \times n $ matrix with real eigenvalues $ \lambda_1, \lambda_2, \dots, \lambda_n $ (not necessarily distinct), then $ \det A = \lambda_1 \lambda_2 \dots \lambda_n $ and $ \operatorname{tr} A = \lambda_1 + \lambda_2 + \dots + \lambda_n $.
\end{corollary}

\begin{definition}{Positive Definite Matrices}{}
    A square matrix is called positive definite if it is symmetric and all its eigenvalues $ \lambda $ are positive.
    \medskip
    \newline
    Since these matrices are symmetric, the principal axes theorem plays a central role in the theory.
\end{definition}

\begin{theorem}{}{}
    If $ A $ is positive definite, then it is invertible and $ \det A > 0 $.
\end{theorem}

\begin{theorem}{}{}
    A symmetric matrix $ A $ is positive definite if and only if $ \mathbf{x}^T A \mathbf{x} > 0 $ for every column $ \mathbf{x} \neq \mathbf{0} \in \mathbb{R}^n $
\end{theorem}

\begin{definition}{Principal Submatrices}{}
    If $ A $ is any $ n \times n $ matrix, let $ ^{\left( r \right)} A $ denote the $ r \times r $ submatrix in the upper left corner of $ A $; that is, $ ^{\left( r \right)} A $ is the matrix obtained from $ A $ by deleting the last $ n - r $ rows and columns. The matrices $ ^{\left( 1 \right)} A, ^{\left( 1 \right)} A, ^{\left( 2 \right)} A, \dots, ^{\left( n \right)} A = A $ are called the principal submatrices of $ A $.
\end{definition}

\begin{lemma}{}{}
    If $ A $ is positive definite, so is each principal submatrix $ ^{\left( r \right)} A $ for $ r = 1, 2, \dots, n $.
\end{lemma}

\begin{theorem}{}{}
    The following conditions are equivalent for a symmetric $ n \times n $ matrix $ A $:
    \begin{enumerate}[label=(\roman*)]
        \item $ A $ is positive definite
        \item $ \det \left( ^{\left( r \right)} A \right) > 0 $ for each $ r = 1, 2, \dots, n $
        \item $ A = U^T U $ where $ U $ is an upper triangular matrix with positive entries on the main diagonal
    \end{enumerate}
    The factorization in (iii) is unique, and called the Cholesky factorization of $ A $.
\end{theorem}

\begin{theorem}{Algorithm for the Cholesky Factorization}{}
    If $ A $ is a positive definite matrix, the Cholesky factorization $ A = U^T U $ can be obtained as follows:
    \begin{enumerate}
        \item Carry $ A $ to an upper triangular matrix $ U_1 $ with positive diagonal entries using row operations each of which adds a multiple of a row to a lower row
        \item Obtain $ U $ from $ U_1 $ by dividing each row of $ U_1 $ by the square root of the diagonal entry in that row
    \end{enumerate}
\end{theorem}

\begin{definition}{Complex Matrix}{}
    A matrix $ A = \left[ a_{ij} \right] $ is called a complex matrix if every entry $ a_{ij} $ is a complex number.
\end{definition}

\begin{definition}{Complex Conjugate}{}
    If $ z = a + bi $ is a complex number, the conjugate of $ z $ is also a complex number, denoted by $ \overline{z} $, given by:
    \[ \overline{z} = a - bi \]
\end{definition}

\begin{definition}{Conjugate Matrix}{}
    If $ A $ is a complex matrix, the conjugate of $ A = \left[ a_{ij} \right] $ is the matrix:
    \[ \overline{A} = \left[ \overline{a}_{ij} \right] \]
    obtained from $ A $ by conjugating every entry.
    \medskip
    \newline
    The properties
    \[ \overline{A + B} = \overline{A} + \overline{B} \quad \text{and} \quad \overline{AB} = \overline{A} \  \overline{B}\]
    hold for all complex matrices of appropriate sizes.
\end{definition}

\begin{definition}{Standard Inner Product in $ \mathbb{C}^n $}{}
    Given $ \mathbf{z} = \left( z_1, z_2, \dots, z_n \right) $ and $ \mathbf{w} = \left( w_1, w_2, \dots, w_n \right) $ in $ \mathbb{C}^n $, define their standard inner product by:
    \[ \langle \mathbf{z}, \mathbf{w} \rangle = z_1 \overline{w}_1 + z_2 \overline{w}_2  + \dots + z_n \overline{w}_n  = \mathbf{z} \cdot \overline{\mathbf{w}} \]
\end{definition}

\begin{theorem}{}{}
    Let $ \mathbf{z}, \mathbf{z}_1, \mathbf{w}, \mathbf{w}_1 $ denote vectors in $ \mathbb{C}^n $, and let $ \lambda $ denote a complex number.
    \begin{enumerate}[label=(\roman*)]
        \item $ \langle \mathbf{z} + \mathbf{z}_1, \mathbf{w} \rangle = \langle \mathbf{z}, \mathbf{w} \rangle + \langle \mathbf{z}_1, \mathbf{w} \rangle $ and $ \langle \mathbf{z}, \mathbf{w} + \mathbf{w_1} \rangle = \langle \mathbf{z}, \mathbf{w} \rangle + \langle \mathbf{z}, \mathbf{w}_1 \rangle $
        \item $ \langle \lambda \mathbf{z}, \mathbf{w} \rangle = \lambda \langle \mathbf{z}, \mathbf{w} \rangle $ and $ \langle \mathbf{z}, \lambda \mathbf{w} \rangle = \overline{\lambda} \langle \mathbf{z}, \mathbf{w} \rangle $
        \item $ \langle \mathbf{z}, \mathbf{w} \rangle = \overline{\langle \mathbf{w}, \mathbf{z} \rangle} $
        \item $ \langle \mathbf{z}, \mathbf{z} \rangle \geq 0 $, and $ \langle \mathbf{z}, \mathbf{z} \rangle = 0 $ iff $ \mathbf{z} = \mathbf{0} $
    \end{enumerate}
\end{theorem}

\begin{definition}{Norm and Length in $ \mathbb{C}^n $}{}
    We define the norm or length $ \lVert \mathbf{z} \rVert $ of a vector $ \mathbf{z} = \left( z_1, z_2, \dots, z_n \right) \in \mathbb{C}^n $ by:
    \[ \lVert \mathbf{z} \rVert = \sqrt{\langle \mathbf{z}, \mathbf{z} \rangle} = \sqrt{\vert z_1 \vert^2 + \vert z_2 \vert^2 + \dots + \vert z_n \vert^2} \]
\end{definition}

\begin{theorem}{}{}
    If $ \mathbf{z} \in \mathbb{C}^n $, then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \lVert \mathbf{z} \rVert \geq 0 $ and $ \lVert \mathbf{z} \rVert = 0 $ iff $ \mathbf{z} = \mathbf{0} $
        \item $ \lVert \lambda \mathbf{z} \rVert = \vert \lambda \vert \lVert \mathbf{z} \rVert \ \forall \lambda \in \mathbb{C} $
    \end{enumerate}
\end{theorem}

\begin{definition}{Conjugate Transpose in $ \mathbb{C}^n $}{}
    The conjugate transpose $ A^H $ of a complex matrix $ A $ is defined by:
    \[ A^H = \left( \overline{A} \right)^T = \overline{\left( A^T \right)} \]
\end{definition}

\begin{theorem}{}{}
    Let $ A $ and $ B $ denote complex matrices, and let $ \lambda $ be a complex number.
    \begin{enumerate}[label=(\roman*)]
        \item $ \left( A^H \right)^H = A $
        \item $ \left( A + B \right)^H = A^H + B^H $
        \item $ \left( \lambda A \right)^H = \overline{\lambda} A^H $
        \item $ \left( AB \right)^H = B^H A^H $
    \end{enumerate}
\end{theorem}

\begin{definition}{Hermitian Matrices}{}
    A square complex matrix $ A $ is called hermitian if $ A^H = A $, or equivalently if $ \overline{A} = A^T $.
\end{definition}

\begin{theorem}{}{}
    An $ n \times n $ complex matrix $ A $ is hermitian if and only if:
    \[ \langle A \mathbf{z}, \mathbf{w} \rangle = \langle \mathbf{z}, A \mathbf{w} \rangle \]
    for all n-tuples $ \mathbf{z}, \mathbf{w} \in \mathbb{C}^n $.
\end{theorem}

\begin{theorem}{}{}
    Let $ A $ denote a hermitian matrix.
    \begin{enumerate}[label=(\roman*)]
        \item The eigenvalues of $ A $ are real
        \item Eigenvectors of $ A $ corresponding to distinct eigenvalues are orthogonal
    \end{enumerate}
\end{theorem}

\begin{definition}{Orthogonal and Orthonormal Vectors in $ \mathbb{C}^n $}{}
    As in the real case, a set of nonzero vectors $ \left\{ \mathbf{z}_1, \mathbf{z}_2, \dots, \mathbf{z}_m \right\} $ in $ \mathbb{C}^n $ is called orthogonal if $ \langle \mathbf{z}_i, \mathbf{z}_j \rangle = 0 $ whenever $ i \neq j $, and it is orthonormal if, in addition, $ \lVert \mathbf{z}_i \rVert = 1 $ for each $ i $.
\end{definition}

\begin{theorem}{}{}
    The following are equivalent for an $ n \times n $ complex matrix $ A $.
    \begin{enumerate}[label=(\roman*)]
        \item $ A $ is invertible and $ A^{-1} = A^H $
        \item The rows of $ A $ are an orthonormal set in $ \mathbb{C}^n $
        \item The columns of $ A $ are an orthonormal set in $ \mathbb{C}^n $
    \end{enumerate}
\end{theorem}

\begin{definition}{Unitary Matrices}{}
    A square complex matrix $ U $ is unitary if $ U^{-1} = U^H $. Thus, a real matrix is unitary iff it is orthogonal.
\end{definition}

\begin{definition}{Unitary Diagonalizable}{}
    An $ n \times n $ complex matrix $ A $ is called unitarily diagonalizable if $ U^H AU $ is diagonal for some unitary matrix $ U $.
\end{definition}

\begin{theorem}{Schur's Theorem}{}
    If $ A $ is any $ n \times n $ complex matrix, there exists a unitary matrix $ U $ such that
    \[ U^H AU = T \]
    is upper triangular. Moreover, the entries on the main diagonal of $ T $ are the eigenvalues $ \lambda_1, \lambda_2, \dots, \lambda_n $ of $ A $ (including multiplicities).
\end{theorem}

\begin{corollary}{}{}
    Let $ A $ be an $ n \times n $ complex matrix, and let $ \lambda_1, \lambda_2, \dots, \lambda_n $ denote the eigenvalues of $ A $, including multiplicities. Then,
    \[ \det A = \lambda_1 \lambda_2 \dots \lambda_n \quad \text{and} \quad \operatorname{tr} A = \lambda_1 + \lambda_2 + \dots + \lambda_n \]
\end{corollary}

\begin{theorem}{Spectral Theorem}{}
    If $ A $ is hermitian, there is a unitary matrix $ U $ such that $ U^H AU $ is diagonal.
\end{theorem}

\begin{definition}{Normal Matrix}{}
    An $ n \times n $ complex matrix $ N $ is called normal if $ N N^H = N^H N $.
\end{definition}

\begin{theorem}{}{}
    An $ n \times n $ complex matrix $ A $ is unitarily diagonalizable if and only if $ A $ is normal.
\end{theorem}

\begin{theorem}{Cayley-Hamilton Theorem}{}
    If $ A $ is an $ n \times n $ complex matrix, then $ c_A \left( A \right) = 0 $; that is, $ A $ is a root of its characteristic polynomial.
\end{theorem}

\begin{definition}{Quadratic Form}{}
    A quadratic form $ q $ in the $ n $ variables $ x_1, x_2, \dots, x_n $ is a linear combination of terms $ x_1^2, x_2^2, \dots x_n^2 $ and cross terms $ x_1 x_2, x_1 x_3, x_2 x_3, \dots $
\end{definition}

\begin{theorem}{Diagonalization Theorem}{}
    Let $ q = \mathbf{x}^T A \mathbf{x} $ be a quadratic form in the variables $ x_1, x_2, \dots x_n $, where $ \mathbf{x} = \left( x_1, x_2, \dots x_n \right)^T $ and $ A $ is a symmetric $ n \times n $ matrix. Let $ P $ be an orthogonal matrix such that $ P^T AP $ is diagonal, and define new variables $ \mathbf{y} = \left( y_1, y_2, \dots, y_n \right)^T $ by:
    \[ \mathbf{x} = P \mathbf{y} \quad \Leftrightarrow \quad \mathbf{y} = P^T \mathbf{x} \]
    If $ q $ is expressed in terms of these new variables $ y_1, y_2, \dots, y_n $, the result is:
    \[ q = \lambda_1 y_1^2 + \lambda_2 y_2^2 + \dots + \lambda_n y_n^2 \]
    where $ \lambda_1, \lambda_2, \dots, \lambda_n $ are the eigenvalues of $ A $ repeated according to their multiplicities.
\end{theorem}

\begin{theorem}{}{}
    If $ q \left( \mathbf{x} \right) = \mathbf{x}^T A \mathbf{x} $ is a quadratic form given by a symmetric matrix $ A $, then $ A $ is uniquely determined by $ q $.
\end{theorem}

\begin{definition}{Congruent Matrices}{}
    Two $ n \times n $ matrices $ A $ and $ B $ are called congruent, written $ A \overset{c}{\sim} B $ if $ B = U^T AU $ for some invertible matrix $ U $. Some properties of congruence are:
    \begin{enumerate}[label=(\roman*)]
        \item $ A \overset{c}{\sim} A $ for all $ A $
        \item If $ A \overset{c}{\sim} B $, then $ B \overset{c}{\sim} A $
        \item If $ A \overset{c}{\sim} B $ and $ B \overset{c}{\sim} C $, then $ A \overset{c}{\sim} C $
        \item If $ A \overset{c}{\sim} B $, then $ A $ is symmetric iff $ B $ is symmetric
        \item If $ A \overset{c}{\sim} B $, then $ \operatorname{rank} A = \operatorname{rank} B $
    \end{enumerate}
\end{definition}

\begin{theorem}{Sylvester's Law of Inertia}{}
    If $ A \overset{c}{\sim} B $, then $ A $ and $ B $ have the same number of positive eigenvalues, counting multiplicities.
\end{theorem}

\begin{definition}{Index}{}
    The index of a symmetric matrix $ A $ is the number of positive eigenvalues of $ A $. If $ q = q \left( \mathbf{x} \right) = \mathbf{x}^T A \mathbf{x} $ is a quadratic form, the index and rank of $ q $ are defined to be the index and rank of the matrix $ A $ respectively.
\end{definition}

\begin{note}{Complete Diagonalization}{}
    Let $ q = q \left( \mathbf{x} \right) = \mathbf{x}^T A \mathbf{x} $ be any quadratic form in $ n $ variables, of index $ k $ and rank $ r $ where $ A $ is symmetric. We claim there are new variables $ \mathbf{z} $ can be found so that $ q $ is completely diagonalized, that is,
    \[ q \left( \mathbf{z} \right) = z_1^2 + \dots + z_k^2 - z_{k+1}^2 - \dots - z_r^2 \]
    If $ k \leq r \leq n $, let $ D_n \left( k, r \right) $ denote the $ n \times n $ diagonal matrix whose main diagonal consists of $ k $ $ 1 $'s, followed by $ r - k $ $ -1 $'s, followed by $ n - r $ $ 0 $'s. Then we seek variables $ \mathbf{z} $ such that:
    \[ q \left( \mathbf{z} \right) = \mathbf{z}^T D_n \left( k, r \right) \mathbf{z} \]
    To determine $ \mathbf{z} $, first diagonalize $ A $ as follows: Find an orthogonal matrix $ P_0 $ such that:
    \[ P_0^T A P_0 = D = \operatorname{diag} \left( \lambda_1, \lambda_2, \dots, \lambda_r, 0, \dots, 0 \right) \]
    is diagonal with the nonzero eigenvalues $ \lambda_1, \lambda_2, \dots, \lambda_r $ of $ A $ on the main diagonal (followed by $ n - r $ zeros). By reordering the columns of $ P_0 $, if necessary, we may assume that $ \lambda_1, \dots, \lambda_k $ are positive and $ \lambda_{k + 1}, \dots, \lambda_r $ are negative. This being the case, let $ D_0 $ be the $ n \times n $ diagonal matrix:
    \[ D_0 = \operatorname{diag} \left( \frac{1}{\sqrt{\lambda_1}}, \dots, \frac{1}{\sqrt{\lambda_k}}, \frac{1}{\sqrt{-\lambda_{k+1}}}, \dots, \frac{1}{\sqrt{\lambda_r}}, 1, \dots, 1 \right) \]
    Then $ D_0^T D D_0 = D_n \left( k, r \right) $, so if new variables $ \mathbf{z} $ are given by $ \mathbf{x} = \left( P_0 D_0 \right) \mathbf{z} $, we obtain:
    \[ q \left( \mathbf{z} \right) = \mathbf{z}^T D_n \left( k, r \right) \mathbf{z} = z_1^2 + \dots + z_k^2 - z_{k+1}^2 - \dots - z_r^2 \]
    as required. Note that the change-of-variables matrix $ P_0 D_0 $ from $ \mathbf{z} $ to $ \mathbf{x} $ has orthogonal columns (in fact, scalar multiples of the columns of $ P_0 $).
\end{note}

\begin{theorem}{}{}
    Let $ A $ and $ B $ be symmetric $ n \times n $ matrices, and let $ 0 \leq k \leq r \leq n $.
    \begin{enumerate}[label=(\roman*)]
        \item $ A $ has index $ k $ and rank $ r $ if and only if $ A \overset{c}{\sim} D_n \left( k, r \right) $
        \item $ A \overset{c}{\sim} B $ if and only if they have the same rank and index
    \end{enumerate}
\end{theorem}

\begin{definition}{Ordered Basis}{}
    An ordered basis is a basis $ \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $ where the order of the vectors is taken into account.
\end{definition}

\begin{definition}{Coordinate Vector $ C_B \left( \mathbf{v} \right) $}{}
    Let $ B = \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $ is an ordered basis of a vector space $ V $, and let $ \mathbf{v} = v_1 \mathbf{b}_1 + v_2 \mathbf{b}_2 + \dots + v_n \mathbf{b}_n $. Then, the coordinate vector of $ \mathbf{v} $ with respect to $ B $ is defined to be
    \[ C_B \left( \mathbf{v} \right) = \left( v_1 \mathbf{b}_1 + v_2 \mathbf{b}_2 + \dots + v_n \mathbf{b}_n \right) = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ \ v_n \ \end{bmatrix} \]
    Note that $ C_B \left( \mathbf{b}_i \right) = \mathbf{e}_i $ is column $ i $ of $ I_n $.
\end{definition}

\begin{theorem}{}{}
    If $ V $ has dimension $ n $ and $ B = \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $ is any ordered basis of $ V $, the coordinate transformation $ C_B : V \to \mathbb{R}^n $ is an isomorphism. In fact, $ C^{-1}_B : \mathbb{R}^n \to V $ is given by:
    \[ C^{-1}_B \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ \ v_n \ \end{bmatrix} = v_1 \mathbf{b}_1 + v_2 \mathbf{b}_2 + \dots + v_n \mathbf{b}_n \quad \forall \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ \ v_n \ \end{bmatrix} \in \mathbb{R}^n \]
\end{theorem}

\begin{definition}{Matrix of $ T $ corresponding to the ordered bases $ B $ and $ D $}{}
    $ M_{DB} \left( T \right) $ of $ T : V \to W $ for bases $ B $ and $ D $ is called the matrix of $ T $ corresponding to the ordered bases $ B $ and $ D $, we use the following notation:
    \[ M_{DB} \left( T \right) = \begin{bmatrix} \ C_D \left[ T \left( \mathbf{b}_1 \right) \right] & C_D \left[ T \left( \mathbf{b}_2 \right) \right] & \cdots & C_D \left[ T \left( \mathbf{b}_n \right) \right] \ \end{bmatrix} \]
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to W $ be a linear transformation where $ \dim V = n $ and $ \dim W = m $, and let $ B = \left\{ \mathbf{b}_1 \dots, \mathbf{b}_n \right\} $ and $ D $ be ordered bases of $ V $ and $ W $, respectively. Then the matrix $ M_{DB} \left( T \right) $ is the unique $ m \times n $ matrix $ A $ that satisfies:
    \[ C_D T = T_A C_B \]
    Hence the defining property of $ M_{DB} \left( T \right) $ is:
    \[ C_D \left[ T \left( \mathbf{v} \right) \right] = M_{DB} \left( T \right) C_B \left( \mathbf{v} \right) \ \forall \mathbf{v} \in V \]
    The matrix $ M_{DB} \left( T \right) $ is given in terms of its columns by:
     \[ M_{DB} \left( T \right) = \begin{bmatrix} \ C_D \left[ T \left( \mathbf{b}_1 \right) \right] & C_D \left[ T \left( \mathbf{b}_2 \right) \right] & \cdots & C_D \left[ T \left( \mathbf{b}_n \right) \right] \ \end{bmatrix} \]
\end{theorem}

\begin{theorem}{}{}
    Let $ V \xrightarrow{T} W \xrightarrow{S} U $ be linear transformations and let $ B $, $ D $, and $ E $ be finite ordered bases of $ V $, $ W $, and $ U $, respectively. Then:
    \[ M_{EB} \left( ST \right) = M_{ED} \left( S \right) \cdot M_{DB} \left( T \right) \]
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to W $ be a linear transformation, where $ \dim V = \dim W = n $. The following are equivalent:
    \begin{enumerate}[label=(\roman*)]
        \item $ M_{DB} \left( T \right) $ is invertible for all ordered bases $ B $ and $ D $ of $ V $ and $ W $
        \item $ M_{DB} \left( T \right) $ is invertible for some pair of ordered bases $ B $ and $ D $ of $ V $ and $ W $
    \end{enumerate}
    When this is the case, $ \left[ M_{DB} \left( T \right) \right]^{-1} = M_{BD} \left( T^{-1} \right) $.
\end{theorem}

\begin{definition}{Rank of a Linear Transformation}{}
    The rank of a linear transformation $ T : V \to W $ is $ \operatorname{rank} T = \dim \left( \operatorname{im} T \right) $. Moreover, if $ A $ is any $ m \times n $ matrix and $ T_A : \mathbb{R}^n \to \mathbb{R}^m $ is the matrix transformation, then $ \operatorname{rank} \left( T_A \right) = \operatorname{rank} A $.
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to W $ be a linear transformation where $ \dim V = n $ and $ \dim W = m $. If $ B $ and $ D $ are any ordered bases of $ V $ and $ W $, then $ \operatorname{rank} T = \operatorname{rank} \left[ M_{DB} \left( T \right) \right] $.
\end{theorem}

\begin{note}{}{}
    If $ T : V \to V $ is a linear operator where $ \dim V = n $, it is possible to choose bases $ B $ and $ D $ of $ V $ such that the matrix $ M_{DB} \left( T \right) $ has a very simple form:
    \[ M_{DB} \left( T \right) = \begin{bmatrix} \ I_r & 0 \ \\ \ 0 & 0 \ \end{bmatrix} \]
    where $ r = \operatorname{rank} T $.
\end{note}

\begin{definition}{Matrix $ M_{B} \left( T \right) $ of $ T : V \to V $ for basis $ B $}{}
    If $ T : V \to V $ is an operator on a vector space $ V $, and if $ B $ is an ordered basis of $ V $, define $ M_B \left( T \right) = M_{BB} \left( T \right) $ and call this the $ B $-matrix of $ T $.
    \medskip
    \newline
    Recall that if $ T : \mathbb{R}^n \to \mathbb{R}^n $ is a linear operator and $ E = \left\{ \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n \right\} $ is the standard basis of $ \mathbb{R}^n $, then $ C_B \left( \mathbf{x} \right) = \mathbf{x} $ for every $ \mathbf{x} \in \mathbb{R}^n $, so $ M_E \left( T \right) = \begin{bmatrix} \ T \left( \mathbf{e}_1 \right) & T \left( \mathbf{e}_2 \right) & \cdots & T \left( \mathbf{e}_n \right) \ \end{bmatrix} $ is the standard matrix of the operator $ T $.
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to V $ be an operator where $ \dim V = n $, and let $ B $ be an ordered basis of $ V $.
    \begin{enumerate}[label=(\roman*)]
        \item $ C_B \left( T \left( \mathbf{v} \right) \right) = M_B \left( T \right) C_B \left( \mathbf{v} \right) \ \forall \mathbf{v} \in V $
        \item If $ S : V \to V $ is another operator on $ V $, then $ M_B \left( ST \right) = M_B \left( S \right) M_B \left( T \right) $
        \item $ T $ is an isomorphism if and only if $ M_B \left( T \right) $ is invertible. In this case $ M_D \left( T \right) $ is invertible for every ordered basis $ D $ of $ V $
        \item If $ T $ is an isomorphism, then $ M_B \left( T^{-1} \right) = \left[ M_B \left( T \right) \right]^{-1} $
        \item If $ B = \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $, then $ M_B \left( T \right) = \begin{bmatrix} \ C_B \left[ T \left( \mathbf{b}_1 \right) \right] & C_B \left[ T \left( \mathbf{b}_2 \right) \right] & \cdots & C_B \left[ T \left( \mathbf{b}_n \right) \right] \ \end{bmatrix} $
    \end{enumerate}
\end{theorem}

\begin{definition}{Change Matrix $ P_{D \leftarrow B} $ for bases $ B $ and $ D $}{}
    Define the change matrix $ P_{D \leftarrow B} $ by:
    \[ P_{D \leftarrow B} = M_{DB} \left( 1_V \right) \quad \text{for any ordered bases $ B $ and $ D $ of $ V $} \]
\end{definition}

\begin{theorem}{}{}
    Let $ B = \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $ and $ D $ denote ordered bases of a vector space $ V $. Then the change matrix $ P_{D \leftarrow B} $ is given in terms of its columns by:
    \[ P_{D \leftarrow B} = \begin{bmatrix} \ C_D \left( \mathbf{b}_1 \right) & C_D \left( \mathbf{b}_2 \right) & \cdots & C_D \left( \mathbf{b}_n \right) \ \end{bmatrix} \]
    and has the property that:
    \[ C_D \left( \mathbf{v} \right) = P_{D \leftarrow B} C_B \left( \mathbf{v} \right) \ \forall \mathbf{v} \in V \]
    Moreover, if $ E $ is another ordered basis of $ V $, we have:
    \begin{enumerate}[label=(\roman*)]
        \item $ P_{B \leftarrow B} = I_n $
        \item $ P_{D \leftarrow B} $ is invertible and $ \left( P_{D \leftarrow B} \right)^{-1} = P_{B \leftarrow D} $
        \item $ P_{E \leftarrow D} P_{D \leftarrow B} = P_{E \leftarrow B} $
    \end{enumerate}
\end{theorem}

\begin{theorem}{Similarity Theorem}{}
    Let $ B_0 $ and $ B $ be two ordered bases of a finite dimensional vector space $ V $. If $ T : V \to V $ is any linear operator, the matrices $ M_B \left( T \right) $ and $ M_{B_0} \left( T \right) $ of $ T $ with respect to these bases are similar. More precisely,
    \[ M_B \left( T \right) = P^{-1} M_{B_0} \left( T \right) P \]
    where $ P = P_{{B_0} \leftarrow B} $ is the change matrix from $ B $ to $ B_0 $.
\end{theorem}

\begin{theorem}{}{}
    Let $ A $ be an $ n \times n $ matrix and let $ E $ be the standard basis of $ \mathbb{R}^n $.
    \begin{enumerate}[label=(\roman*)]
        \item Let $ A' $ be similar to $ A $, say $ A' = P^{-1} AP $, and let $ B $ be the ordered basis of $ \mathbb{R}^n $ consisting of the columns of $ P $ in order. Then $ T_A : \mathbb{R}^n \to \mathbb{R}^n $ is linear and:
        \[ M_E \left( T_A \right) = A \quad \text{and} \quad M_B \left( T_A \right) = A' \]
        \item If $ B $ is any ordered basis of $ \mathbb{R}^n $, let $ P $ be the (invertible) matrix whose columns are the vectors in $ B $ in order. Then:
        \[ M_B \left( T_A \right) = P^{-1} AP \]
    \end{enumerate}
\end{theorem}

\begin{definition}{Similarity Invariant}{}
    A property of $ n \times n $ matrices is similarity invariant if, whenever a given $ n \times n $ matrix $ A $ which has the property, every matrix similar to $ A $ also has the property. 
\end{definition}

\begin{definition}{Determinant}{}
    If $ T : V \to V $ is a linear operator on a finite dimensional space $ V $, define the determinant of $ T $ (denoted $ \det T $) by:
    \[ \det T = \det M_B \left( T \right), \quad B \ \text{any basis of} \ V \]
\end{definition}

\begin{definition}{Trace}{}
    If $ T : V \to V $ is a linear operator on a finite dimensional space $ V $, define the trace of $ T $ (denoted $ \operatorname{tr} T $) by:
    \[ \operatorname{tr} T = \operatorname{tr} M_B \left( T \right), \quad B \ \text{any basis of} \ V \]
\end{definition}

\begin{definition}{Characteristic Polynomial}{}
    If $ T : V \to V $ is a linear operator on a finite dimensional space $ V $, define the characteristic polynomial of $ T $ by:
    \[ c_T \left( x \right) = c_A \left( x \right) \ \text{where} \ A = M_B \left( T \right), \quad B \ \text{any basis of} \ V \]
    In other words, the characteristic polynomial of an operator $ T $ is the characteristic polynomial of any matrix representing $ T $.
\end{definition}

\begin{definition}{Image under $ T $}{}
    If $ U $ is a subspace of $ V $, write its image under $ T $ as:
    \[ T \left( U \right) = \left\{ T \left( \mathbf{u} \right) \mid \mathbf{u} \in U \right\} \]
\end{definition}

\begin{definition}{$ T $-invariant Subspace}{}
    Let $ T : V \to V $ be an operator. A subspace $ U \subseteq V $ is called $ T $-invariant if $ T \left( U \right) \subseteq U $, that is $ T \left( \mathbf{u} \right) \in U $ for every vector $ \mathbf{u} \in U $. Hence, $ T $ is a linear operator on the vector space $ U $.
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to V $ be any linear operator. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \left\{ \mathbf{0} \right\} $ and $ V $ are $ T $-invariant subspaces
        \item Both $ \ker T $ and $ \operatorname{im} T = T \left( V \right) $ are $ T $-invariant subspaces
        \item If $ U $ and $ W $ are $ T $-invariant subspaces, so are $ T \left( U \right) $, $ U \cap W $, and $ U + W $
    \end{enumerate}
\end{theorem}

\begin{definition}{Restriction of an Operator}{}
    Let $ T : V \to V $ be a linear operator. If $ U $ is any $ T $-invariant subspaces of $ V $, then:
    \[ T : U \to U \]
    is a linear operator on the subspace $ U $, called the restriction of $ T $ to $ U $
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a linear operator where $ V $ has dimension $ n $ and suppose that $ U $ is any $ T $-invariant subspace of $ V $. Let $ B_1 = \left\{ \mathbf{b}_1, \dots, \mathbf{b}_k \right\} $ be any basis of $ U $ and extend it to a basis $ B = \left\{ \mathbf{b}_1, \dots, \mathbf{b}_k, \mathbf{b}_{k+1}, \dots, \mathbf{b}_n \right\} $ of $ V $ is any way. Then $ M_B \left( T \right) $ has the block triangular form:
    \[ M_B \left( T \right) = \begin{bmatrix} \ M_{B_1} \left( T \right) & Y \ \\ \ 0 & Z \ \end{bmatrix} \]
    where $ Z $ is $ \left( n - k \right) \times \left( n - k \right) $ and $ M_{B_1} \left( T \right) $ is the matrix of the restriction of $ T $ to $ U $.
\end{theorem}

\begin{theorem}{}{}
    Let $ A $ be a block upper triangular matrix, say
    \[ \begin{bmatrix} \ A_{11} & A_{12} & A_{13} & \cdots & A_{1n} \ \\ \ 0 & A_{22} & A_{23} & \cdots & A_{2n} \ \\ \ 0 & 0 & A_{33} & \cdots & A_{3n} \ \\ \ \vdots & \vdots & \vdots & & \vdots \ \\ \ 0 & 0 & 0 & \dots & A_{nn} \ \end{bmatrix} \]
    where the diagonal blocks are square. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \det A = \left( \det A_{11} \right) \left( \det A_{22} \right) \left( \det A_{33} \right) \cdots \left( \det A_{nn} \right) $
        \item $ c_A \left( x \right) = c_{A_{11}} \left( x \right) c_{A_{22}} \left( x \right) c_{A_{33}} \left( x \right) \cdots c_{A_{nn}} \left( x \right) $
    \end{enumerate}
\end{theorem}

\begin{definition}{One Dimensional $ T $-Invariant Subspace}{}
    Let $ T : V \to V $ be a linear operator. A one dimensional subspace $ \mathbb{R} \mathbf{v} $, $ \mathbf{v} \neq 0 $, is $ T $-invariant if and only if $ T \left( r \mathbf{v} \right) = r T \left( \mathbf{v} \right) $ lies in $ \mathbb{R} \mathbf{v} $ for all $ r \in \mathbb{R} $. This holds if and only if $ T \left( \mathbf{v} \right) $ lies in $ \mathbb{R} \mathbf{v} $, that is, $ T \left( \mathbf{v} \right) = \lambda \mathbf{v} $ for some $ \lambda \in \mathbb{R} $.
\end{definition}

\begin{definition}{Eigenvalue of an Operator}{}
    A real number $ \lambda $ is called an eigenvalue of an operator $ T : V \to V $ if:
    \[ T \left( \mathbf{v} \right) = \lambda \mathbf{v} \]
    holds for some nonzero vector $ \mathbf{v} \in V $. In this case, $ \mathbf{v} $ is called an eigenvector of $ T $ corresponding to $ \lambda $.
\end{definition}

\begin{definition}{Eigenspace of a Linear Operator}{}
    Let $ T : V \to V $. The subspace:
    \[ E_\lambda \left( T \right) = \left\{ \mathbf{v} \in V \mid T \left( \mathbf{v} \right) = \lambda \mathbf{v} \right\} \]
    is called the eigenspace of $ T $ corresponding to $ \lambda $.
\end{definition}

\begin{theorem}{}{}
    If $ A $ is an $ n \times n $ matrix, a real number $ \lambda $ is an eigenvalue of the matrix operator $ T_A : \mathbb{R}^n \to \mathbb{R}^n $ if and only if $ \lambda $ is an eigenvalue of the matrix $ A $. Moreover, the eigenspaces agree:
    \[ E_\lambda \left( T_A \right) = \left\{ \mathbf{x} \in \mathbb{R}^n \mid A \mathbf{x} = \lambda \mathbf{x} \right\} = E_\lambda \left( A \right) \]
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a linear operator where $ \dim V = n $ and let $ B $ denote any ordered basis of $ V $, and let $ C_B : V \to \mathbb{R}^n $ denote the coordinate isomorphism. Then:
    \begin{enumerate}[label=(\roman*)]
        \item The eigenvalues $ \lambda $ of $ T $ are precisely the eigenvalues of the matrix $ M_B \left( T \right) $ and thus are the roots of the characteristic polynomial $ c_T \left( x \right) $
        \item In this case, the eigenspaces $ E_\lambda \left( T \right) $ and $ E_\lambda \left[ M_B \left( T \right) \right] $ are isomorphic via the restriction $ C_B : E_\lambda \left( T \right) \to E_\lambda \left[ M_B \left( T \right) \right] $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Each eigenspace of the linear operator $ T : V \to V $ is a $ T $-invariant subspace of $ V $.
\end{theorem}

\begin{definition}{Direct Sum of Subspaces}{}
    A vector space $ V $ is said to be the direct sum of subspaces $ U $ and $ W $ if:
    \[ U \cap W = \left\{ \mathbf{0} \right\} \quad \text{and} \quad U + W = V \]
    In this case, we write $ V = U \oplus W $. Given a subspace $ U $, any subspace $ W $ such that $ U \oplus W $ is called a complement of $ U $ in $ V $.
\end{definition}

\begin{theorem}{}{}
    Let $ U $ and $ W $ be subspaces of a finite dimensional vector space $ V $. The following three conditions are equivalent:
    \begin{enumerate}[label=(\roman*)]
        \item $ V = U \oplus W $
        \item Each vector $ \mathbf{v} \in V $ can be written uniquely in the form
        \[ \mathbf{v} = \mathbf{u} + \mathbf{w} \quad \text{where} \ \mathbf{u} \in U, \mathbf{w} \in W \]
        \item If $ \left\{ \mathbf{u}_1, \dots, \mathbf{u}_k \right\} $ and $ \left\{ \mathbf{w}_1, \dots, \mathbf{w}_m \right\} $ are bases of $ U $ and $ W $ respectively, then $ B = \left\{ \mathbf{u}_1, \dots, \mathbf{u}_k, \mathbf{w}_1, \dots, \mathbf{w}_m \right\} $ is a basis of $ V $.
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a linear operator where $ V $ has dimension $ n $. Suppose $ V = U_1 \oplus U_2 $ where both $ U_1 $ and $ U_2 $ are $ T $-invariant. If $ B_1 = \left\{ \mathbf{b}_1, \dots, \mathbf{b}_k \right\} $ and $ B_2 = \left\{ \mathbf{b}_{k+1}, \dots, \mathbf{b}_n \right\} $ are  bases of $ U_1 $ and $ U_2 $ respectively, then:
    \[ B = \left\{ \mathbf{b}_1, \dots, \mathbf{b}_k, \mathbf{b}_{k+1}, \dots, \mathbf{b}_n \right\} \]
    is a basis of $ V $, and $ M_B \left( T \right) $ has the block diagonal form:
    \[ M_B \left( T \right) = \begin{bmatrix} \ M_{B_1} \left( T \right) & 0 \ \\ \ 0 & M_{B_2} \left( T \right) \ \end{bmatrix} \]
    where $ M_{B_1} \left( T \right) $ and $ M_{B_2} \left( T \right) $ are the matrices of the restrictions of $ T $ to $ U_1 $ and to $ U_2 $ respectively.
\end{theorem}

\begin{definition}{Reducible Linear Operator}{}
    A linear operator $ T : V \to V $ is said to be reducible if nonzero $ T $-invariant subspaces $ U_1 $ and $ U_2 $ can be found such that $ V = U_1 \oplus U_2 $.
\end{definition}

\begin{definition}{Involution}{}
    Let $ T : V \to V $ be a linear operator such that $ T^2 = 1_V $. Then, $ T $ is an involution.
\end{definition}

\begin{definition}{Inner Product Spaces}{}
    An inner product on a real vector space $ V $ is a function that assigns a real number $ \langle \mathbf{v}, \mathbf{w} \rangle $ to every pair $ \mathbf{v}, \mathbf{w} $ of vectors in $ V $ in such a way that the following axioms are satisfied:
    \begin{enumerate}[label=(\roman*)]
        \item $ \langle \mathbf{v}, \mathbf{w} \rangle $ is a real number for all $ \mathbf{v}, \mathbf{w} \in V $
        \item $ \langle \mathbf{v}, \mathbf{w} \rangle = \langle \mathbf{w}, \mathbf{v} \rangle $
        \item $ \langle \mathbf{v} + \mathbf{w}, \mathbf{u} \rangle = \langle \mathbf{v}, \mathbf{u} \rangle + \langle \mathbf{w}, \mathbf{u} \rangle $ for all $ \mathbf{u}, \mathbf{v}, \mathbf{w} \in V $
        \item $ \langle r \mathbf{v}, \mathbf{w} \rangle = r \langle \mathbf{v}, \mathbf{w} \rangle $ for all $ \mathbf{v}, \mathbf{w} \in V $ and all $ r \in \mathbb{R} $
        \item $ \langle \mathbf{v}, \mathbf{v} \rangle > 0 $ for all $ \mathbf{v} \neq \mathbf{0} $ in $ V $
    \end{enumerate}
\end{definition}

\begin{definition}{Inner Product Space}{}
    A real vector space $ V $ with an inner product $ \langle \ , \ \rangle $ is called an inner product space.
\end{definition}

\begin{note}{}{}
    Every subspace of an inner product space is again an inner product space using the same inner product.
\end{note}

\begin{theorem}
    Let $ V $ be an inner product space with inner product $ \langle \ , \ \rangle $; let $ \mathbf{v} $, $ \mathbf{u} $, and $ \mathbf{w} $ denote vectors in $ V $, and let $ r $ denote a real number.
    \begin{enumerate}[label=(\roman*)]
        \item $ \langle \mathbf{u}, \mathbf{v} + \mathbf{w} \rangle = \langle \mathbf{u}, \mathbf{v} \rangle + \langle \mathbf{u}, \mathbf{w} \rangle $
        \item $ \langle \mathbf{v}, r \mathbf{w} \rangle = r \langle \mathbf{v}, \mathbf{w} \rangle = \langle r \mathbf{v}, \mathbf{w} \rangle $
        \item $ \langle \mathbf{v}, \mathbf{0} \rangle = 0 = \langle \mathbf{0}, \mathbf{v} \rangle $
        \item $ \langle \mathbf{v}, \mathbf{v} \rangle = 0 $ if and only if $ \mathbf{v} = \mathbf{0} $
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    If $ A $ is any $ n \times n $ positive definite matrix, then
    \[ \langle \mathbf{x}, \mathbf{y} \rangle = \mathbf{x}^T A \mathbf{y} \quad \text{for all columns} \ \mathbf{x}, \mathbf{y} \in \mathbb{R}^n \]
    defines an inner product on $ \mathbb{R}^n $, and every inner product on $ \mathbb{R}^n $ arises in this way.
\end{theorem}

\begin{note}{}{}
    Just as every linear operator $ \mathbb{R}^n \to \mathbb{R}^n $ corresponds to an $ n \times n $ matrix, every inner product on $ \mathbb{R}^n $ corresponds to a positive definite $ n \times n $ matrix. In particular, the dot product corresponds to the identity matrix $ I_n $.
\end{note}

\begin{remark}{}{}
    If we refer to the inner product space $ \mathbb{R}^n $ without specifying the inner product, we mean that the dot product is to be used.
\end{remark}

\begin{definition}{Norm and Distance}{}
    As in $ \mathbb{R}^n $, if $ \langle \ , \ \rangle $ is an inner product on a space $ V $, the norm $ \lVert \mathbf{v} \rVert $ of a vector $ \mathbf{v} \in V $ is defined by:
    \[ \lVert \mathbf{v} \rVert = \sqrt{ \langle \mathbf{v}, \mathbf{v} \rangle } \]
    We define the distance between vectors $ \mathbf{v} $ and $ \mathbf{w} $ in an inner product space to be:
    \[ d \left( \mathbf{v}, \mathbf{w} \right) = \lVert \mathbf{v} - \mathbf{w} \rVert \]
\end{definition}

\begin{definition}{Unit Vector}{}
    A vector $ \mathbf{v} $ in an inner product space $ V $ is called a unit vector if $ \lVert \mathbf{v} \rVert = 1 $. The set of all unit vectors in $ V $ is called the unit ball in $ V $.
\end{definition}

\begin{theorem}{}{}
    If $ \mathbf{v} \neq \mathbf{0} $ is any vector in an inner product space $ V $, then $ \frac{1}{\lVert \mathbf{v} \rVert} \mathbf{v} $ is the unique unit vector that is a positive multiple of $ \mathbf{v} $.
\end{theorem}

\begin{theorem}{Cauchy-Schwarz Inequality}{}
    If $ \mathbf{v} $ and $ \mathbf{w} $ are two vectors in an inner product space $ V $, then
    \[ \langle \mathbf{v}, \mathbf{w} \rangle^2 \leq \lVert \mathbf{v} \rVert^2 \lVert \mathbf{w} \rVert^2 \]
    Moreover, equality occurs if and only if one of $ \mathbf{v} $ and $ \mathbf{w} $ is a scalar multiple of the other.
\end{theorem}

\begin{theorem}{}{}
    If $ V $ is an inner product, the norm $ \lVert \ \rVert $ has the following properties:
    \begin{enumerate}[label=(\roman*)]
        \item $ \lVert \mathbf{v} \rVert \geq 0 $ for every vector $ \mathbf{v} \in V $
        \item $ \lVert \mathbf{v} \rVert = 0 $ if and only if $ \mathbf{v} = \mathbf{0} $
        \item $ \lVert r \mathbf{v} \rVert = \vert r \vert \lVert \mathbf{v} \rVert $ for every $ \mathbf{v} \in V $ and every $ r \in \mathbb{R} $
        \item $ \lVert \mathbf{v} + \mathbf{w} \rVert \leq \lVert \mathbf{v} \rVert + \lVert \mathbf{w} \rVert $ for all $ \mathbf{v}, \mathbf{w} \in V $ (triangle inequality)
    \end{enumerate}
\end{theorem}

\begin{theorem}{}{}
    Let $ V $ be an inner product space.
    \begin{enumerate}[label=(\roman*)]
        \item $ d \left( \mathbf{v}, \mathbf{w} \right) \geq 0 $ for all $ \mathbf{v}, \mathbf{w} \in V $
        \item $ d \left( \mathbf{v}, \mathbf{w} \right) = 0 $ if and only if $ \mathbf{v} = \mathbf{w} $
        \item $ d \left( \mathbf{v}, \mathbf{w} \right) = d \left( \mathbf{w}, \mathbf{v} \right) $ for all $ \mathbf{v}, \mathbf{w} \in V $
        \item $ d \left( \mathbf{v}, \mathbf{w} \right) \leq d \left( \mathbf{v}, \mathbf{u} \right) + d \left( \mathbf{u}, \mathbf{w} \right) $ for all $ \mathbf{v}, \mathbf{u}, \mathbf{w} \in V $
    \end{enumerate}
\end{theorem}

\begin{definition}{Orthogonality}{}
    Two vectors $ \mathbf{v} $ and $ \mathbf{w} $ in an inner product space $ V $ are said to be orthogonal if
    \[ \langle \mathbf{v}, \mathbf{w} \rangle = 0 \]
\end{definition}

\begin{definition}{Orthogonal and Orthonormal Sets}{}
    A set $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ of vectors is called an orthogonal set of vectors if:
    \begin{enumerate}[label=(\roman*)]
        \item Each $ \mathbf{f}_i \neq \mathbf{0} $
        \item $ \langle \mathbf{f}_i, \mathbf{f}_j \rangle $ for all $ i \neq j $
    \end{enumerate}
    If, in addition, $ \lVert \mathbf{f}_i \rVert = 1 $ for each $ i $, the set $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ is called an orthonormal set.
\end{definition}

\begin{theorem}{Pythagoras' Theorem}{}
    If $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ is an orthogonal set of vectors, then:
    \[ \lVert \mathbf{f}_1 + \mathbf{f}_2 + \dots + \mathbf{f}_n \rVert^2 = \lVert \mathbf{f}_1 \rVert^2 + \lVert \mathbf{f}_2 \rVert^2 + \dots + \lVert \mathbf{f}_n \rVert^2 \]
\end{theorem}

\begin{theorem}{}{}
    Let $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ be an orthogonal set of vectors.
    \begin{enumerate}[label=(\roman*)]
        \item $ \left\{ r_1 \mathbf{f}_1, r_2 \mathbf{f}_2, \dots, r_n \mathbf{f}_n \right\} $ is also orthogonal for any $ r_i \neq 0 \in \mathbb{R} $
        \item $ \left\{ \frac{1}{\lVert \mathbf{f}_1 \rVert} \mathbf{f}_1, \frac{1}{\lVert \mathbf{f}_2 \rVert} \mathbf{f}_2, \dots, \frac{1}{\lVert \mathbf{f}_n \rVert} \mathbf{f}_n \right\} $ is an orthonormal set
    \end{enumerate}
    The process of passing from an orthogonal set to an orthonormal one is called normalizing the orthogonal set.
\end{theorem}

\begin{theorem}{}{}
    Every orthogonal set of vectors is linearly independent.
\end{theorem}

\begin{theorem}{Expansion Theorem}{}
    Let $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ be an orthogonal basis of an inner product space $ V $. If $ \mathbf{v} $ is any vector in $ V $, then:
    \[ \mathbf{v} = \frac{\langle \mathbf{v}, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 + \frac{\langle \mathbf{v}, \mathbf{f}_2 \rangle}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 + \dots + \frac{\langle \mathbf{v}, \mathbf{f}_n \rangle}{\lVert \mathbf{f}_n \rVert^2} \mathbf{f}_n \]
    is the expansion of $ \mathbf{v} $ as a linear combination of the basis vectors.
    \medskip
    \newline
    The coefficients $ \frac{\langle \mathbf{v}, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1, \frac{\langle \mathbf{v}, \mathbf{f}_2 \rangle}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2, \dots, \frac{\langle \mathbf{v}, \mathbf{f}_n \rangle}{\lVert \mathbf{f}_n \rVert^2} \mathbf{f}_n $ in the expansion theorem are sometimes called the Fourier coefficients of $ \mathbf{v} $ with respect to the orthogonal basis $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $.
\end{theorem}

\begin{definition}{Lagrange Polynomials}{}
    Let $ a_0, a_1, \dots, a_n $ be distinct numbers. The Lagrange polynomial corresponding to $ a_k $ is
    \[ \delta_k \left( x \right) = \frac{\prod_{i \neq k} \left( x - a_i \right)}{\prod_{i \neq k} \left( a_k - a_i \right)} \quad k = 0, 1, 2, \dots, n \]
    It satisfies the interpolation property
    \[ \delta_k \left( a_i \right) = \begin{cases} 1, & i = k \\ 0, & i \neq k \end{cases} \]
    with the inner product
    \[ \langle p \left( x \right), q \left( x \right) \rangle = \sum_{i = 0}^n p \left( a_i \right) q \left( a_i \right) \]
    the set $ \left\{ \delta_0, \delta_1, \dots, \delta_n \right\} $ forms an orthonormal basis for $ \mathbf{P}_n $.
\end{definition}

\begin{definition}{Lagrange Interpolation Expansion}{}
    Every polynomial $ p \left( x \right) \in \mathbf{P}_n $ can be written as
    \[ p \left( x \right) = \sum_{k = 0}^n p \left( a_k \right) \delta_k \left( x \right) \]
    This is called the Lagrange interpolation expansion (or Lagrange interpolation formula). It reconstructs a polynomial from its values at the distinct points $ a_0, a_1, \dots, a_n $.
\end{definition}

\begin{lemma}{Orthogonal Lemma}{}
    Let $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ be an orthogonal set of vectors in an inner product space $ V $, and let $ \mathbf{v} $ be any vector not in $ \operatorname{span} \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $. Define
    \[ \mathbf{f}_{m + 1} = \mathbf{v} - \frac{\langle \mathbf{v}, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 - \frac{\langle \mathbf{v}, \mathbf{f}_2 \rangle}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 - \dots - \frac{\langle \mathbf{v}, \mathbf{f}_m \rangle}{\lVert \mathbf{f}_m \rVert^2} \mathbf{f}_m \]
    Then $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m, \mathbf{f}_{m + 1} \right\} $ is an orthogonal set of vectors.
\end{lemma}

\begin{theorem}{Gram-Schmidt Orthogonalization Algorithm}{}
    Let $ V $ be an inner product space and let $ \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \right\} $ be any basis of $ V $. Define vectors $ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \in V $ successively as follows: 
    \begin{align*}
        \mathbf{f}_1 & = \mathbf{v}_1 \\
        \mathbf{f}_2 & = \mathbf{v}_2 - \frac{\langle \mathbf{v}_2, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 \\
        \mathbf{f}_3 & = \mathbf{v}_3 - \frac{\langle \mathbf{v}_3, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 - \frac{\langle \mathbf{v}_3, \mathbf{f}_2 \rangle}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 \\
        \vdots \\
        \mathbf{f}_k & = \mathbf{v}_k - \frac{\langle \mathbf{v}_k, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 - \frac{\langle \mathbf{v}_k, \mathbf{f}_2 \rangle}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 - \dots - \frac{\langle \mathbf{v}_k, \mathbf{f}_{k - 1} \rangle}{\lVert \mathbf{f}_{k - 1} \rVert^2} \mathbf{f}_{k - 1} \\
    \end{align*}
    for each $ k = 2, 3, \dots n $. Then:
    \begin{enumerate}[label=(\roman*)]
        \item $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ is an orthogonal basis of $ V $
        \item $ \operatorname{span} \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_k \right\} = \operatorname{span} \left\{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k \right\} $ for each $ k = 1, 2, \dots, n $
    \end{enumerate}
    The purpose of the Gram-Schmidt algorithm is to convert a basis of an inner product space into an orthogonal basis. In particular, it shows that every finite dimensional inner product space has an orthogonal basis.
\end{theorem}

\begin{corollary}{}{}
    If $ V $ is any $ n $-dimensional inner product space, then $ V $ is isomorphic to $ \mathbb{R}^n $ as inner product spaces. More precisely, if $ E $ is any orthonormal basis of $ V $, the coordinate isomorphism
    \[ C_E : V \to \mathbb{R}^n \ \text{satisfies} \ \langle \mathbf{v}, \mathbf{w} \rangle = C_E \left( \mathbf{v} \right) \cdot C_E \left( \mathbf{w} \right) \]
    for all $ \mathbf{v}, \mathbf{w} \in V $.
\end{corollary}

\begin{definition}{Orthogonal Complement}{}
    Let $ U $ be a subspace of an inner product space $ V $. As in $ \mathbb{R}^n $, the orthogonal complement $ U^\perp $ of $ U $ in $ V $ is defined by:
    \[ U^\perp = \left\{ \mathbf{v} \in V \mid \langle \mathbf{v}, \mathbf{u} \rangle = 0 \ \forall \mathbf{u} \in U \right\} \]
\end{definition}

\begin{theorem}{}{}
    Let $ U $ be a finite dimensional subspace of an inner product space $ V $
    \begin{enumerate}[label=(\roman*)]
        \item $ U^\perp $ is a subspace of $ V $ and $ V $ = $ U \oplus U^\perp $
        \item If $ \dim V = n $, then $ \dim U + \dim U^\perp = n $
        \item If $ \dim V = n $, then $ U^{\perp \perp} = U $
    \end{enumerate}
\end{theorem}

\begin{definition}{Orthogonal Projection on a Subspace}{}
    The projection on $ U $ with kernel $ U^\perp $ is called the orthogonal projection on $ U $ (or simply the projection on $ U $) and is denoted $ \operatorname{proj}_U : V \to V $
\end{definition}

\begin{theorem}{Projection Theorem}{}
    Let $ U $ be a finite dimensional subspace of an inner product space $ V $ and let $ \mathbf{v} \in V $
    \begin{enumerate}[label=(\roman*)]
        \item $ \operatorname{proj}_U : V \to V $ is a linear operator with image $ U $ and kernel $ U^\perp $
        \item $ \operatorname{proj}_U \mathbf{v} \in U $ and $ \left( \mathbf{v} - \operatorname{proj}_U \mathbf{v} \right) \in U^\perp $
        \item If $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_m \right\} $ is any orthogonal basis of $ U $, then
        \[ \operatorname{proj}_U \mathbf{v} = \frac{\langle \mathbf{v}, \mathbf{f}_1 \rangle}{\lVert \mathbf{f}_1 \rVert^2} \mathbf{f}_1 + \frac{\langle \mathbf{v}, \mathbf{f}_2 \rangle}{\lVert \mathbf{f}_2 \rVert^2} \mathbf{f}_2 + \dots + \frac{\langle \mathbf{v}, \mathbf{f}_m \rangle}{\lVert \mathbf{f}_m \rVert^2} \mathbf{f}_m \]
        Note that there is no requirement that $ V $ is finite dimensional.
    \end{enumerate}
\end{theorem}

\begin{theorem}{Approximation Theorem}{}
    Let $ U $ be a finite dimensional subspace of an inner product space $ V $. If $ \mathbf{v} $ is any vector in $ V $, then $ \operatorname{proj}_U \mathbf{v} $ is the vector in $ U $ that is closest to $ \mathbf{v} $. Here closest means that
    \[ \lVert \mathbf{v} - \operatorname{proj}_U \mathbf{v} \rVert < \lVert \mathbf{v} - \mathbf{u} \rVert \]
    for all $ \mathbf{u} \in U, u \neq \operatorname{proj}_U \mathbf{v} $.
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a linear operator on a finite dimensional space $ V $. Then the following conditions are equivalent:
    \begin{enumerate}[label=(\roman*)]
        \item $ V $ has a basis consisting of eigenvectors of $ T $
        \item There exists a basis $ B $ of $ V $ such that $ M_B \left( T \right) $ is diagonal
    \end{enumerate}
\end{theorem}

\begin{definition}{Diagonalizable Linear Operators}{}
    A linear operator $ T $ on a finite dimensional space $ V $ is called diagonalizable if $ V $ has a basis consisting of eigenvectors of $ T $.
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a linear operator on an inner product space $ V $. If $ B = \left\{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \right\} $ is an orthogonal basis of $ V $, then
    \[ M_B \left( T \right) = \left[ \frac{\langle \mathbf{b}_i, T \left( \mathbf{b}_j \right) \rangle}{\lVert \mathbf{b}_i \rVert^2} \right] \]
\end{theorem}

\begin{theorem}{}{}
    Let $ V $ be a finite dimensional inner product space. The following conditions are equivalent for a linear operator $ T : V \to V $.
    \begin{enumerate}[label=(\roman*)]
        \item $ \langle \mathbf{v}, T \left( \mathbf{v} \right) \rangle = \langle T \left( \mathbf{v} \right), \mathbf{w} \rangle $ for all $ \mathbf{v}, \mathbf{w} \in V $
        \item The matrix of $ T $ is symmetric with respect to every orthonormal basis of $ V $
        \item The matrix of $ T $ is symmetric with respect to some orthonormal basis of $ V $
        \item There is an orthonormal basis $ B = \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ of $ V $ such that $ \langle \mathbf{f}_i, T \left( \mathbf{f}_j \right) \rangle = \langle T \left( \mathbf{f}_i \right), \mathbf{f}_j \rangle $ holds for all $ i $ and $ j $.
    \end{enumerate}
\end{theorem}

\begin{definition}{Symmetric Linear Operator}{}
    A linear operator $ T $ on an inner product space $ V $ is called symmetric if $ \langle \mathbf{v}, T \left( \mathbf{w} \right) \rangle = \langle T \left( \mathbf{v} \right), \mathbf{w} \rangle $ holds for all $ \mathbf{v}, \mathbf{w} \in V $.
\end{definition}

\begin{theorem}{}{}
    A symmetric linear operator on a finite dimensional inner product space has real eigenvalues.
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a symmetric linear operator on an inner product space $ V $, and let $ U $ be a $ T $-invariant subspace of $ V $. Then:
    \begin{enumerate}[label=(\roman*)]
        \item The restriction of $ T $ to $ U $ is a symmetric linear operator on $ U $
        \item $ U^\perp $ is also $ T $-invariant
    \end{enumerate}
\end{theorem}

\begin{theorem}{Principal Axes Theorem}{}
    The following conditions are equivalent for a linear operator $ T $ on a finite dimensional inner product space $ V $.
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is symmetric
        \item $ V $ has an orthogonal basis consisting of eigenvectors of $ T $
    \end{enumerate}
\end{theorem}

\begin{definition}{Distance Preserving}{}
    If $ V $ is an inner product space, a transformation $ S : V \to V $ (not necessarily linear) is said to be distancing preserving if:
    \[ \lVert S \left( \mathbf{v} \right) - S \left( \mathbf{w} \right) \rVert = \lVert \mathbf{v} - \mathbf{w} \rVert \quad \text{for all} \ \mathbf{v}, \mathbf{w} \in V \]
\end{definition}

\begin{lemma}{}{}
    Let $ V $ be an inner product space of dimension $ n $, and consider a distance preserving transformation $ S : V \to V $. If $ S \left( \mathbf{0} \right) = \mathbf{0} $, then $ S $ is linear.
\end{lemma}

\begin{definition}{Isometries}{}
    Distance preserving linear operators are called isometries.
\end{definition}

\begin{theorem}{}{}
    If $ V $ is a finite dimensional inner product space, then every distance preserving transformation $ S : V \to V $ is the composite of a translation and an isometry.
\end{theorem}

\begin{theorem}{}{}
    Let $ T : V \to V $ be a linear operator on a finite dimensional inner product space $ V $. The following conditions are equivalent:
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is an isometry ($ T $ preserves distance)
        \item $ \lVert T \left( \mathbf{v} \right) \rVert = \lVert \mathbf{v} \rVert \ \forall \mathbf{v} \in V $ ($ T $ preserves norms)
        \item $ \langle T \left( \mathbf{v} \right), T \left( \mathbf{w} \right) \rangle = \langle \mathbf{v}, \mathbf{w} \rangle \ \forall \mathbf{v}, \mathbf{w} \in V $ ($ T $ preserves inner products)
        \item If $ \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $ is an orthonormal basis of $ V $, then $ \left\{ T \left( \mathbf{f}_1 \right), T \left( \mathbf{f}_2 \right), \dots, T \left( \mathbf{f}_n \right) \right\} $ is also an orthonormal basis ($ T $ preserves orthonormal bases)
        \item $ T $ carries some orthonormal basis to an orthonormal basis
    \end{enumerate}
\end{theorem}

\begin{corollary}{}{}
    Let $ V $ be a finite dimensional inner product space.
    \begin{enumerate}[label=(\roman*)]
        \item Every isometry of a finite dimensional $ V $ is an isomorphism
        \begin{enumerate}
            \item $ 1_V : V \to V $ is an isometry
            \item The composite of two isometries of $ V $ is an isometry
            \item The inverse of an isometry of $ V $ is an isometry
        \end{enumerate}
    \end{enumerate}
    The conditions in (ii) assert that the set of isometries of a finite dimensional inner product space form a group.
\end{corollary}

\begin{theorem}{}{}
    Let $ T : V \to V $ be an operator where $ V $ is a finite dimensional inner product space. The following conditions are equivalent.
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is an isometry
        \item $ M_B \left( T \right) $ is an orthogonal matrix for every orthonormal basis $ B $
        \item $ M_B \left( T \right) $ is an orthogonal matrix for some orthonormal basis $ B $
    \end{enumerate}
\end{theorem}

\begin{corollary}{}{}
    If $ T : V \to V $ is an isometry where $ V $ is a finite dimensional inner product space, then $ \det T = \pm 1 $.
\end{corollary}

\begin{theorem}{}{}
    Let $ T : V \to V $ be an isometry on the two-dimensional inner product space $ V $. Then there are two possibilities:
    \begin{enumerate}[label=(\roman*)]
        \item There is an orthonormal basis $ B $ of $ V $ such that
        \[ M_B \left( T \right) = \begin{bmatrix} \ \cos \theta & -\sin \theta \ \\ \ \sin \theta & \cos \theta \ \end{bmatrix}, 0 \leq \theta < 2 \pi \]
        \item There is an orthonormal basis $ B $ of $ V $ such that
        \[ M_B \left( T \right) = \begin{bmatrix} \ 1 & 0 \\ \ 0 & -1 \ \end{bmatrix} \]
    \end{enumerate}
    Furthermore, type (i) occurs if and only if $ \det T = 1 $, and type (ii) occurs if and only if $ \det T = -1 $.
\end{theorem}

\begin{corollary}{}{}
    An operator $ T : \mathbb{R}^2 \to \mathbb{R}^2 $ is an isometry if and only if $ T $ is a rotation or a reflection.
\end{corollary}

\begin{lemma}{}{}
    Let $ T : V \to V $ be an isometry of a finite dimensional inner product space $ V $. If $ U $ is a $ T $-invariant subspace of $ V $, then $ U^\perp $ is also $ T $-invariant.
\end{lemma}

\begin{lemma}{}{}
    Let $ T : V \to V $ be an isometry of the finite dimensional inner product space $ V $. If $ \lambda $ is a complex eigenvalue of $ T $, then $ \lvert \lambda \rvert = 1 $.
\end{lemma}

\begin{lemma}{}{}
    Let $ T : V \to V $ be an isometry of the $ n $-dimensional inner product space $ V $. If $ T $ has a non-real eigenvalue, then $ V $ has a two-dimensional $ T $-invariant subspace.
\end{lemma}

\begin{theorem}{}{}
    Let $ T : V \to V $ be an isometry of the $ n $-dimensional inner product space $ V $. Given an angle $ \theta $, write $ R \left( \theta \right) = \begin{bmatrix} \ \cos \theta & -\sin \theta \ \\ \ \sin \theta & \cos \theta \ \end{bmatrix} $. Then there exists an orthonormal basis $ B $ of $ V $ such that $ M_B \left( T \right) $ has one of the following block diagonal forms, classified for convenience by whether $ n $ is odd or even:
    \[ n = 2k + 1: \begin{bmatrix} \ 1 & 0 & \cdots & 0 \ \\ \ 0 & R \left( \theta_1 \right) & \cdots & 0 \ \\ \ \vdots & \vdots & \ddots & \vdots \ \\ \ 0 & 0 & \cdots & R \left( \theta_k \right) \ \end{bmatrix} \quad \text{or} \quad \begin{bmatrix} \ -1 & 0 & \cdots & 0 \ \\ \ 0 & R \left( \theta_1 \right) & \cdots & 0 \ \\ \ \vdots & \vdots & \ddots & \vdots \ \\ \ 0 & 0 & \cdots & R \left( \theta_k \right) \ \end{bmatrix} \]
    \[ n = 2k: \begin{bmatrix} \ R \left( \theta_1 \right) & 0 & \cdots & 0 \ \\ \ 0 & R \left( \theta_2 \right) & \cdots & 0 \ \\ \ \vdots & \vdots & \ddots & \vdots \ \\ \ 0 & 0 & \cdots & R \left( \theta_k \right) \ \end{bmatrix} \quad \text{or} \quad \begin{bmatrix} \ -1 & 0 & 0 & \cdots & 0 \ \\ \ 0 & 1 & 0 & \cdots & 0 \ \\ \ 0 & 0 & R \left( \theta_1 \right) & \cdots & 0 \ \\ \ \vdots & \vdots & \vdots & \ddots & \vdots \ \\ \ 0 & 0 & 0 & \cdots & R \left( \theta_{k - 1} \right) \ \end{bmatrix} \]
\end{theorem}

\begin{theorem}{}{}
    If $ T : \mathbb{R}^3 \to \mathbb{R}^3 $ is an isometry, there are three possibilities.
    \begin{enumerate}[label=(\roman*)]
        \item $ T $ is a rotation, and $ M_B \left( T \right) = \begin{bmatrix} \ 1 & 0 & 0 \ \\ \ 0 & \cos \theta & -\sin \theta \ \\ \ 0 & \sin \theta & \cos \theta \ \end{bmatrix} $ for some orthonormal basis $ B $.
        \item $ T $ is a reflection, and $ M_B \left( T \right) = \begin{bmatrix} \ 1 & 0 & 0 \ \\ \ 0 & 1 & 0 \ \\ \ 0 & 0 & 1 \ \end{bmatrix} $ for some orthonormal basis $ B $.
        \item $ T = QR = RQ $ where $ Q $ is a reflection, $ R $ is a rotation about an axis perpendicular to the fixed plane of $ Q $ and $ M_B \left( T \right) = \begin{bmatrix} \ -1 & 0 & 0 \ \\ \ 0 & \cos \theta & -\sin \theta \ \\ \ 0 & \sin \theta & \cos \theta \ \end{bmatrix} $ for some orthonormal basis $ B $.
    \end{enumerate}
    Hence, $ T $ is a rotation if and only if $ \det T = 1 $.
\end{theorem}

\begin{definition}{Hyperplane}{}
    Let $ V $ be an $ n $-dimensional inner product space. A subspace of $ V $ of dimension $ n - 1 $ is called a hyperplane in $ V $.
\end{definition}

\begin{definition}{Fixed Hyperplanes and Reflection}{}
    Let $ V $ be an $ n $-dimensional inner product space, and let $ Q : V \to V $ be an isometry with matrix
    \[ M_B \left( Q \right) = \begin{bmatrix} \ -1 & 0 \ \\ \ 0 & I_{n - 1} \ \end{bmatrix} \]
    for some orthonormal basis $ B = \left\{ \mathbf{f}_1, \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $. Then $ Q \left( \mathbf{f}_1 \right) = -\mathbf{f}_1 $ whereas $ Q \left( \mathbf{u} \right) = \mathbf{u} $ for each $ \mathbf{u} \in U = \operatorname{span} \left\{ \mathbf{f}_2, \dots, \mathbf{f}_n \right\} $. Hence $ U $ is called the fixed hyperplane of $ Q $ and $ Q $ is called reflection in $ U $. Note that each hyperplane in $ V $ is the fixed hyperplane of a (unique) reflection of $ V $.
\end{definition}

\begin{theorem}{}{}
    Let $ T : V \to V $ be an isometry of a finite dimensional inner product space $ V $. Then there exist isometries $ T_1, \dots, T_k $ such that
    \[ T = T_k T_{k - 1} \cdots T_2 T_1 \]
    where each $ T_i $ is either a rotation or a reflection, at most one is a reflection, and $ T_i T_j = T_j T_i $ holds for all $ i $ and $ j $. Furthermore, $ T $ is a composite of rotations if and only if $ \det T = 1 $.
\end{theorem}

\end{document}